locked
how to provide a drop down list with check boxes in crm 4.0 form RRS feed

  • Question

  • Hi all,

    This is my requirement. I would need to provide list of related records in the form (for ex: list of related leads of same account based on some criteria) and user may say select one or more from the list. I am thinking to use jscript to implement this. I would like to know if you have any thoughts or links for implementing the same.

    if not jscript, provide me any other alternate solution. Thanks in Advance.

    Monday, August 29, 2011 9:38 AM

All replies

  • Hi,

    You may refer to the the following post for complete solution: http://blogs.msdn.com/b/crm/archive/2009/03/31/crm-4-0-checkbox-style-multi-select-picklist.aspx


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Monday, August 29, 2011 11:08 AM
  • Hi Javeed,

    Picklist might not be useful in my case. since, I have to dynamically fill the drop down based on the lead owner(or any other). is this possible with picklist? based on my knowledge, pick list should have values prior.

     

     

     

    Tuesday, August 30, 2011 10:52 AM
  • Hi,

    Yes picklist values should be defined before and published ( Settings -> Customization -> Customize Entities  -> Lead -> Fields -> , double click on the picklist field and add values) , but you can filter (remove or add values) from the picklist using JavaScript (but should must define all values in the field customizations), so you can define your picklist values in entity field and then can add/remove options based on the Lead Owner

    var oField = crmForm.all.SOME_PICKLIST_FIELD_ID;
    

    // Add optionset value dynamically (this value should must exsist in entity field metadata ir else on saving the form you will recieve error)
    oField.AddOption("Label1", 10001);


    // Remove optionset value dynamically
    oField.DeleteOption(10001);


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Tuesday, August 30, 2011 3:06 PM
  • Hi Javeed,

    I agree with you. However, I would go for a dynamic drop down rather than picklist. becoz, I need to populate different lead related information which would vary from one lead to another lead. so creating a picklist with hundreds of values is not feasible, I guess.

    so I take a text field. use javascript and convert the textfield to drop down (select) control. get the related values using webservice and fill in the dropdown. Hope my solution works.

    Please share your thoughts.

    Wednesday, August 31, 2011 4:17 AM
  • Hi,

    Your solution will work but you have to remove the drop down (picklist) values (or if drop down (picklist) value will not match then system will generate error) on saving the form and populate the drop down list again on Form Onload.


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Wednesday, August 31, 2011 1:33 PM