The library includes 2 files:
- Sdk.Soap.min.js This is the minified version of the library. The size of the file is around 164kb.
- Sdk.Soap.vsdoc.jsThis file should be used at design time to add IntelliSense to JavaScript
Advantages/Benefits
The following lists some of the benefits/advantages of using this library.-
Writing JavaScript like C#
The library helps you to write JavaScript like C# code. It provides object models, methods and messages like C#. It is more productive if you are a C# developer. -
IntelliSense
The Sdk.Soap.vsdoc.js file contains comments for the developers. It will be used at design time to provide IntelliSense. You just need to add a reference directive on the top of your .js file as shown below:
/// <reference path="..path/Sdk.Soap.vsdoc.js" /> -
Choice of Early Bound and Late Bound Classes
The library provides the option to chose early binding and late binding in your code. I prefer the late binding but other people may prefer early binding classes as it provides the IntelliSense at design time for CRM entities. The solution also provides an early binding class entities generator to generate early bind classes for CRM entities. It is an equivalent of crmserviceutil.exe -
Choice of Namespaces
The library supports the following 8 core IOrganisationService methods.
Associate,Create, Delete, Disassociate, Execute, Retrieve, RetrieveMultiple and Update.
The library provides the 4 different namespaces that implement these core methods: - Sdk.Async: It executes the methods asynchronously. The method signatures provide the successCallBack and errorCallBack parameters.
- Sdk.Sync: It executes the methods synchronously.
- Sdk.jQ: It is an alternative approach to implementing asynchronous operations. It returns a jQuery.Deferred object/Promise. The initial state of the object is pending. The code will wait until the promise is resolved or rejected to execute the next line of the code. In short, it is like writing synchronous code for asynchronous calls. I will post some sample code to explain the difference between callbacks and promises at a later date.
This namespace depends on the existence of the jQuery.
- Sdk.Q:This is also the implementation of the “Promise” concept discussed above in Sdk.JQ.
- Messages/Actions
Apart from the 8 core methods, the library supports 202 different methods. The library also provides a utility to create methods for custom action methods. - Supported Queries
The Sdk.Soap.js library supports the three main query styles used with retrieve operations:
Things to consider
- The library was originally written for CRM2013. The Sdk.Xml.getEnvelopeHeader function specifies an SdkClientVersion value of 6.0. It does work for CRM2013 and CRM2015. It may change in future.
- It does not contain all the messages.Please check the documentation on the libarary page.
- Delete the messages that are not required for your project to reduce the size of the JavaScript file.
- Delete the namespaces that are not required
-
Sdk.Soap.js (contains the core libraries)
Sdk.Soap.js Entity Class Generator (tool to create libraries for CRM entities for ‘early binding’ and IntelliSense)
- Sdk.Soap.js Action Message Generator (tool to generate the support libraries for custom actions in your organization.
-
Sdk.Soap.js Samples (code sample using the library)
Here is the list of the downloads for the library:
Best blog I read for a while. Thanks Amreek. Your blogs help us explore ourselves further
ReplyDeleteI blog frequently and I really appreciate your information. This great article has truly peaked my interest.
ReplyDeletehttp://el-tamimi.com/best-lawyer/
http://el-tamimi.com/divorce-lawyer/
http://el-tamimi.com/best-lawyer/
This comment has been removed by the author.
ReplyDeleteشركة مكافحة النمل الابيض بالرياض
ReplyDeleteشركة مكافحة النمل الابيض بجدة
شركة مكافحة النمل الابيض بابها
شركة تنظيف بالخرج
ReplyDeleteشركة تنظيف مسابح بالخرج
شركة مكافحة حشرات بالخرج
شركة تنظيف ستائر بالخرج
شركة تنظيف بالرياض
شركة تنظيف منازل بالرياض
شركة تنظيف مجالس بالرياض