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).
_________________________________________________________________________
0 comments :
Post a Comment