How do you clear a Regarding field on load with java RRS feed

  • Question

  • Basically I need to clear the value in "regardingobjectid" on load with javascript within an activity. I don't know java, so I figured someone on here could help. Best, Grayson
    Thursday, June 2, 2011 7:31 PM


All replies

  • Found this piece of code, it worked. Thanks anyway crmForm.all.regardingobjectid.DataValue = null; crmForm.all.regardingobjectid.DataValue = [];
    • Proposed as answer by BSimons Thursday, June 2, 2011 7:44 PM
    Thursday, June 2, 2011 7:42 PM
  • Hi,

    You can use the script on Form Onload, Field OnChange events:

    CRM 4.0 : crmForm.all.regardingobjectid.DataValue = null;

    CRM 2011: Xrm.Page.data.entity.attributes.get("regardingobjectid").setValue(null);

    Thank You,
    Jehanzeb Javeed,
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".

    Thursday, June 2, 2011 7:45 PM