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);
}
*This post is locked for comments