Javascript functions of Xrm.Page.data

There are certains functions in Xrm.Page.data context , which are very useful in implementation of CRM projects.

1. Xrm.Page.data.entity.getId();

this function will returns the value of primary key of current record.

2. Xrm.Page.data.entity.getPrimaryAttributeValue();

this function will returns the Primary Attribute values. In this context Primary attribute is nothing but "name" field. so, the above function will returns the whatever the value "name" field contains.

3. Xrm.Page.data.entity.getDataXml();

this function will returns an XML which contains all the attributes whose values are changes while saving the form.

4. Xrm.Page.data.entity.getEntityName();

this function will returns the entity name of the current record.

5. Xrm.Page.data.entity.getEntityReference();

this function will returns the lookup object of the current record like below example.

Xrm.LookupObject {entityType: "new_state", id: "{28AC4FCF-3B22-E511-80D9-3863BB349780}", name: "AP"}




You may like below posts

Improving MS CRM Performance

Performance Center in MS CRM 2013

date and time field behavior in MS CRM

Upsert in MSCRM

Locking mechanism in MS CRM

Ticker Symbol Field in MS CRM

Themes in MS CRM

Enable Tracing in MS CRM

Calculated Field in Dynamics CRM 2015

IME Mode in MS CRM

No comments:

Post a Comment

Featured Post

Improving MS CRM Performance

Performance on MS CRM is always a crucial thing and we may follow different ways to achieve the performance thing. Below is the one more a...