**I would like to create a web resource to customize a form in dynamic 365 in javascript .What is the correct syntax **
I would like to create a web resource to customize a form in dynamic 365 in javascript .What is the correct syntax
CodePudding user response:
This should be your man bro. pref_ = pref you use in your entity
if (typeof (pref_) == "undefined") { pref_= { __namespace: true }; }
if (typeof (pref_.entityname) == "undefined") { pref_.entityname= { __namespace: true }; }
pref_.entityname.Form = new function () {
var formContext = null;
var globalContext = null;
var _self = this;
var setContext = function (executionContext) {
if (executionContext !== null) {
formContext = executionContext.getFormContext();
}
globalContext = Xrm.Utility.getGlobalContext();
};
_self.onLoad = function (executionContext) {
f()
}
var f = function () {
alert("Hello");
}
};
};