Hello and welcome

to Intellicore’s blog where we will give you info on relevant topics in relation to IT. We see the blog as a joint effort and would love to hear what you would like us to feature (there’s no point in us writing a blog that’s not of interest and we’d hate to bore you…)

Update Value of Lookup Field in CRM 2011 Using JavaScript


Issues faced regularly by Dynamics CRM 2011 developers often require updating of the value inside a lookup field using JavaScript.  In order to do so easily, a simple function can be written to include in libraries:
  
  
This function takes 4 parameters:


1.            fieldname –    The name of the lookup field to be updated.
2.            IdValue –        The GUID of the record to be set in the lookup field.
3.            TextValue –    The name of the record to be set into the lookup field.
4.            TypeValue –   The entities logical name that is going to be set in the lookup field.


Before using this function it’s necessary to know all the above details, such as the record to set ID and name.  This can be achieved by querying CRMs data using Odata (See this stack-overflow question for more information: http://stackoverflow.com/questions/7874562/crm-2011-getting-entity-with-javascript).


Need help? To Find out more about our exclusive CRM services, click here






_________________________________________________________________________

0 comments :

Post a Comment