admin管理员组文章数量:1356515
There is one JavaScript web resource in CRM 2011 called new\_/Script/genericJScript.js
. Which contains some functions say, \_retrieveRecord()
and \_Context()
as below. And I need to call these methods from another JavaScript web resource called new\_/Script/testJScript.js
. How can we do this?
if (typeof (MyTest) == "undefined")
{
MYTEST = { __namespace: true };
}
MYTEST.RESTCALL = {
_Context: function () {
......
},
_retrieveRecord: function () {
......
},
};
There is one JavaScript web resource in CRM 2011 called new\_/Script/genericJScript.js
. Which contains some functions say, \_retrieveRecord()
and \_Context()
as below. And I need to call these methods from another JavaScript web resource called new\_/Script/testJScript.js
. How can we do this?
if (typeof (MyTest) == "undefined")
{
MYTEST = { __namespace: true };
}
MYTEST.RESTCALL = {
_Context: function () {
......
},
_retrieveRecord: function () {
......
},
};
Share
Improve this question
edited Dec 14, 2012 at 13:27
Charan Raju C R
asked Feb 20, 2012 at 9:21
Charan Raju C RCharan Raju C R
7685 gold badges22 silver badges43 bronze badges
2
- why don't you just load it like document.write('<script src="your script location.js"></script>') and call the method afterwards? hope i understood the question :D – sdepold Commented Feb 20, 2012 at 9:23
- Its inside CRM 2011 environment. And I need to call a method say _Context().. – Charan Raju C R Commented Feb 20, 2012 at 9:44
2 Answers
Reset to default 4Assuming you include both resources on your form (I am assuming you are doing this from), the following should be valid:
webresource1.js
function HelloWorld() {
alert('Hello, world!');
}
webresource2.js
//should alert 'Hello, World!' using the method from the other webresource
HelloWorld();
I think the answer is simply to call MYTEST.RESTCALL._context()
本文标签: dynamics crmCall javascript function from another javascript webresourceStack Overflow
版权声明:本文标题:dynamics crm - Call javascript function from another javascript webresource - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744004664a2574482.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论