locked
Dont allow the form to save RRS feed

  • Question

  • Hi all,

     I have 9 values in my Picklist of employee entity, i dont want close form until any value chosen from the  picklist.

    i.e i dont want to save employee entity form with empty(null) value of  picklist.

    how i manage to do this.



    Regards,
    Natarajan
    Natarajan.V
    Tuesday, May 12, 2009 5:00 AM

Answers

  • This line in your form save event will cancel the save operation.

    event.returnValue = false;
    Tuesday, May 12, 2009 6:38 AM
  • another alternative is to set the attribute to mandatory ... then you don't have to manage this by code.
    Tuesday, May 12, 2009 6:39 AM
  • // add this to the onSave event of the entity


    if(crmForm.all.new_picklistAttribute.DataValue == null) { event.returnValue = false; }


    sys admin
    Sunday, May 17, 2009 8:35 AM

All replies

  • This line in your form save event will cancel the save operation.

    event.returnValue = false;
    Tuesday, May 12, 2009 6:38 AM
  • another alternative is to set the attribute to mandatory ... then you don't have to manage this by code.
    Tuesday, May 12, 2009 6:39 AM
  • // add this to the onSave event of the entity


    if(crmForm.all.new_picklistAttribute.DataValue == null) { event.returnValue = false; }


    sys admin
    Sunday, May 17, 2009 8:35 AM