3

CRM 2011 中有一个 JavaScript Web 资源,称为new\_/Script/genericJScript.js. 其中包含一些功能说,\_retrieveRecord()如下\_Context()。我需要从另一个名为new\_/Script/testJScript.js. 我们应该怎么做?

if (typeof (MyTest) == "undefined")
{
  MYTEST = { __namespace: true };
}

MYTEST.RESTCALL = {
  _Context: function () {
    ......
  },

  _retrieveRecord: function () {
    ......
  },
};
4

2 回答 2

4

假设您在表单中包含这两个资源(我假设您是从这里开始的),以下内容应该是有效的:

webresource1.js

function HelloWorld() {
  alert('Hello, world!');
}

webresource2.js

//should alert 'Hello, World!' using the method from the other webresource
HelloWorld();
于 2012-02-20T12:35:35.553 回答
1

我认为答案很简单MYTEST.RESTCALL._context()

于 2012-02-20T09:47:45.160 回答