Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fetch Metadata in CRM 2011 using javascript synchronously

Is there any way to fetch metadata from CRM 2011 using javascript in a synchronous manner? If it is, could someone please hit me up with some sample code present in the SDK (I couldn't find it) or maybe your own code?

Thanks.

like image 448
Anupam Avatar asked Feb 19 '26 07:02

Anupam


1 Answers

In the SDK, in the samplecode\js\soapforjscript\soapforjscript\scripts\sdk.metadata.js file there are RetrieveAllEntitiesAsync, RetrieveEntityAsync, and RetrieveAttributeAsync examples. To make synchronous, change the third parameter of the req.open statements to false. Then you can remove the onreadystatechange handler and handle the response immediately after the req.send(request); statement.

like image 153
John Hoven Avatar answered Feb 20 '26 21:02

John Hoven



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!