Dynamics CRM 4.0 · Javascript

CRM 4.0: Add/Set Selected Picklist Item Using Javascript

This is how to add a new and set selected picklist item using javascript on CRM 4.0.

crmForm.all.new_field.AddOption('New Option', 555);
crmForm.all.new_field.DataValue = 555;

Cheers – Sy

Advertisements

2 thoughts on “CRM 4.0: Add/Set Selected Picklist Item Using Javascript

  1. Have 1 problem with removing this picklist values. I have one picklist and set of values. Based on selection of 2values of another picklist I have to show and hide the second picklist options. remove function is working but the problem is if the user reselected the option again from the first picklist it will not show the removed values I mean restoring is not happening.

    1. Hi Sreelal,

      Yes unfortunately that is how it works. The solution is either to refresh the form or repopulate the picklist items manually.

      Cheers,
      Sy

Leave a Reply

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