Monday, August 20, 2007

javascript Onchange event in CRM 3.0

today we had to change the value of a filed(Disabled) in a crm form when another field value was getting changed. we were able to do this firslty and when saved, the data got saved perfectly.

we were happy till we saw that when updated the disbaled field value was not changed eventhough we have actually changed the value by modifying the affected field.

after sone time we thought that since we are using javascripts the value is not getting passed to the server, because the server thinks that the value has not been changed.

So we used the followinf statement to check whether the value will be chnaged and what do you know, it worked perfectly.

crmForm.all.[fieldName].forceSubmit = true;

As i got to know this is very useful when it comes to disbaled fields. whether the field value has got chaned or not when saving the value of this field will be sent to the server.

No comments:

Post a Comment

Retrieving Calendar of a Bookable Resource in Dynamics

There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...