Hii everyone.
I have an MyShoppings is an Entity and I have written a query in which I am fetching data with shopping name = "Brand Factory".
The code is:-
function ShopOnLoad()
{
alert('Function approached");
var shopFetchXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'> "+
" <entity name='new_myshopping'> "+
" <attribute name='new_myshoppingid'/>"+
" <attribute name='new_shoppingname'/>"+
" <attribute name='createdon'/>"+
" <order attribute='new_shoppingname' descending='false'/>"+
" <filter type='and'>"+
" <condition attribute='new_shoppingname' operator='eq' value='Brand Factory'/>"+
" </filter>"+
" </entity>"+
"</fetch>" ;
alert("XMLFetch Query Executed");
var shopRecords = XrmServiceToolkit.Soap.Fetch(shopFetchXML);
alert("Multiple data fetched");
//if(shopRecords.length > 0)
//{
alert("If Condition approached");
alert(shopRecords[0].attributes.new_shoppingname.value);
}//
alert("Finished");
}
The error I got that ShoponLoad is not defined at eval.
I have defined in form Load of an MyShopping Entity.
For this I have also applied Jquery,Json,XRMToolkit Web Resources I have added.
*This post is locked for comments