Managing JavaScript Code in CRM

Hi,

Most of the time while writing JavaScript in CRM, we end up writing duplicate code i.e.

For e.g. if there are two fields say field1 and field2  and on selection of a particular value in field1,  we would like to make field2 mandatory.

Here we would first write the code for that in the onSave event of the field1.

Than again we would have to put the same code in the onload event also to reflect the same condition.

After some time it becomes really difficult to maintain it!

However there is a solution to that, just browsing through stunnware site, got this particular article on reusing Javascript.

Please go through that !!

Reusing code in OnLoad and OnChange event handlers

Just thought of sharing it ….



Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s