Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

XrmServiceToolkit error in ms crm 2015

Posted on by 260

I have the error on form load. It says "XrmServiceToolkit" is not defined. I defined the libraries on form. In my javascript i call the function soap. It gives me the error How can I solve this problem. I wrote my javascript code in test3 library and added to the form.My javascript function is here:

try{
var destekid = getLookupValue("new_yerelreklamdestek");
var destekEnt = getRecord("new_destek_YerelReklam", destekid.id);
var anabayi = destekEnt.new_AnaBayi;

var pickList = Xrm.Page.getControl("new_anabayimaazalar");

var FetchXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>"+
" <entity name='account'>"+
" <all-attributes />"+
" <filter type='and'>"+
"<condition attribute='new_anabayi' operator='eq' value='" + anabayi.Id + "' />" +
" <condition attribute='new_faaliyetbitistarihi' operator='null' />"+
" <condition attribute='statuscode' operator='eq' value='1' />"+
" <condition attribute='customertypecode' operator='eq' value='7' />"+
" </filter>"+
" </entity>"+
"</fetch>";

var fetchData = XrmServiceToolkit.Soap.Fetch(FetchXML);// Myu code fails here

for(var i=0; i <fetchData.length; i++)

{

var high = {value : fetchData[i].attributes.Id, text : fetchData[i].attributes.Name.value};
pickList.addOption(high);

}

}
catch(e){
alert(e.message);
}

xrmerror.jpg

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans