locked
Sub Industry picklist disbaled, but value is still being stored. RRS feed

  • Question

  • Hello,

    I followed the CRM (4.0) Dynamic Picklist value code from the sdk, and the industry/sub industry picklists work perfectly. However, after testing, here is what I noticed...

    I chose an Industry option and a corresponding Sub Industry option and save the record. I opened the record and changed the previous Industry value to one that does NOT have a corresponding Sub Industry value. The Sub Industry picklist was disabled and looked great.

    When I ran an advanced find for my Sub Industries, I noticed that even though my Sub Industry field looked blank in the form - it was still storing the old value when I ran a report.

    Is there any way to clear an old value? I can post the code if needed.

     

    Thank you!

    Ak

    Thursday, April 7, 2011 9:18 PM

Answers

  • If a field is disabled, by default it will not be saved.  If you want your dependent picklist to save correctly after being disabled, you must force it to save:

    crmForm.all.<picklistattribute>.ForceSubmit = true;
    


    --pogo (pat)
    • Proposed as answer by Janu_m Friday, April 8, 2011 3:07 AM
    • Marked as answer by AMcrm Tuesday, April 12, 2011 3:23 PM
    Thursday, April 7, 2011 11:09 PM
  • If Industry does not have the sub Industry, are you setting sub Industry picklist value to null?

    crmForm.all.<subIndustry>.DataValue = null;

    crmForm.all.<subIndustry>.ForceSubmit =true;

    Thanks and Regards

    Ramu

    Osmosys

    Osmosee's Blog

    • Proposed as answer by Janu_m Friday, April 8, 2011 3:11 AM
    • Marked as answer by AMcrm Tuesday, April 12, 2011 3:23 PM
    Friday, April 8, 2011 3:11 AM

All replies

  • If a field is disabled, by default it will not be saved.  If you want your dependent picklist to save correctly after being disabled, you must force it to save:

    crmForm.all.<picklistattribute>.ForceSubmit = true;
    


    --pogo (pat)
    • Proposed as answer by Janu_m Friday, April 8, 2011 3:07 AM
    • Marked as answer by AMcrm Tuesday, April 12, 2011 3:23 PM
    Thursday, April 7, 2011 11:09 PM
  • If Industry does not have the sub Industry, are you setting sub Industry picklist value to null?

    crmForm.all.<subIndustry>.DataValue = null;

    crmForm.all.<subIndustry>.ForceSubmit =true;

    Thanks and Regards

    Ramu

    Osmosys

    Osmosee's Blog

    • Proposed as answer by Janu_m Friday, April 8, 2011 3:11 AM
    • Marked as answer by AMcrm Tuesday, April 12, 2011 3:23 PM
    Friday, April 8, 2011 3:11 AM
  • ForceSubmit did it. Thanks for your help.
    Tuesday, April 12, 2011 3:24 PM