Showing posts with label XRM Service Tool Kit. Show all posts
Showing posts with label XRM Service Tool Kit. Show all posts

Wednesday, July 29, 2015

How to set header field value in Dynamics CRM form?



Setting the header field values is not supported in xrm. So, we must move to unsupported ways to set the value of the fields added in header.
Following code snippet will help us to achieve the goal.

document.getElementById("header_xxx_d").childNodes[0].innerText = value;

In the above code snippet, replace xxx with your field name that exists in the header and value with your value you need to set.

But it'll not save in the database. To achieve this you should add a hidden field on  the form and set its value when you are setting value for the header field and then at  on-load event again get the value and assign to the above code snippet.

Cheers!


Friday, July 10, 2015

How to use XRM Service Toolkit in Microsoft Dynamcis CRM Forms??

XrmServiceToolkit is a JavaScript library which can be used for JavaScript Development under the platform for Microsoft Dynamics CRM 2011/2013/2015 environments. The library contains four major parts regarding functions.Like, General Methods used for various purpose,Rest, Soap and other jQuery extension to utilize WebResource to extend CRM 2011 / CRM 2013 / CRM 2015 including dependent OptionSet, field tooltip, add custom filter view to lookup field.

How to use the XRM Service Toolkit
  1. Download toolkit from here
  2. Extract the downloaded zip.
  3. Open the solution in Microsoft Dynamics CRM
  4. Create New web resource give its ‘Name’, ‘Display Name’, Select the ‘Script(JScript)’ from Type and then browse for the jQuery file that comes with the XRM Service Tool Kit
  5. Create two more web resource for json and XRMServiceToolKit, by repeating the step ‘4’
  6. Add all these web resources to a form in the following order:
    i. jQuery
    ii. jSon
    iii.XrmServiceToolkit
    iv.Your web resource library

Enjoy!