Get/Set field values in JavaScript for Dynamics CRM

Hi,

Sometimes we want to set or get field value from javascript . in this article we will learn it.
First we need to know dynamics crm field's name. Which field we want to set or get data.
As an example, we use the vs_customertaxno field.

we have to make javascript library on dynamics crm 2011.

javascript code for get data

Xrm.Page.data.entity.attributes.get("vs_customertaxno").getValue();

javascript code for set data

Xrm.Page.data.entity.attributes.get("vs_customertaxno").setValue(Value);

thats all
Have a good day

Add comment