Tuesday, July 2, 2013

Save Disabled Field value to CRM 2011

I am here writing How to save Disable Field/Attribute Value to CRM db.

Because, if the field is disabled then it will not save the Actual Value of that field/attribute to db.

I can show you one scenario where it can create a problem.

Let suppose there is a field on Account Entity Form and it is in disabled form.
And then you change its value using javascipts, it will show you the changes on form that time.

But when you save the form, it will not actually save that field to crm db.

Here is the Solution for the same.

Write below javascript line where you set your disables field property.

Xrm.Page.data.entity.attributes.get(<YourAttributeName>).setValue(<YourValue>);

Xrm.Page.data.entity.attributes.get(<YourAttributeName>).setSubmitMode('always'); // Save the Disabled Field



Enjoy !!! :-)

No comments:

Post a Comment

Create SSRS Report on Selected Records in Microsoft Dynamics CRM 2011

Here i will demonstrate what i have not seen in many blogs and sites. I will show you here that How to develop an SSRS Report in CR...