In this short post I will show you how to loop through the optionSet option in Microsoft Crm 2011 in JavaScript. some time you need to check specific text or value in the optionSet and then enable/ disabled or show hide some of the control on the form.
List 1
In the code above listed in List 1 I have used the OptionSetControl.getOptions() function to get all the optionSet options and then use the lenght property which return the number of options in the optionSet. In for loop I have used the alert to show the option text and value.
All and any comments / bugs / suggestions are welcomed !
2 comments:
Would you know how to remove an option from the list getOptions(), because I want the picklist to show only what needed.
Excellent pieces. Keep posting such kind of information on your blog. I really impressed by your blog.
Vee Eee Technologies| Vee Eee Technologies|
Post a Comment