While working
on client-side customization using Java Script in MS CRM 365, it is very common
requirement to get the Lookup field value which can be done using following code-
Let’s look into
the code step by step-
First of
all we have to get the entity object using formContext.data.entity.attributes.get()
Method
E.g.
var ObjAccount
= formContext.data.entity.attributes.get("accountid");
Once the object
is available in the variable ObjAccount we can use GetValue() method as shown
below-
E.g.
var ObjAccountValues
= ObjAccount.getValue();
GetValue()
Metho return the id, name and entityType properties which can we accessed as
shown in full function written to get the Looup Values
No comments:
Post a Comment