创建或编辑web资源以扩展Javascript中的应用动态365

js5cn81o  于 2023-01-16  发布在  Java
关注(0)|答案(1)|浏览(87)

我想创建一个Web资源,以便用JavaScript在Dynamic 365中自定义表单。正确的语法是什么

我想创建一个web资源来定制一个动态365中的javascript表单。正确的语法是什么

qhhrdooz

qhhrdooz1#

这应该是你的兄弟。pref_=你在你的实体中使用的pref

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");
        }
    };
};

相关问题