Answered by:
Dont allow the form to save

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.VTuesday, May 12, 2009 5:00 AM
Answers
-
This line in your form save event will cancel the save operation.
event.returnValue = false;- Proposed as answer by JuergenBeckModerator Thursday, May 14, 2009 4:09 PM
- Marked as answer by Donna EdwardsMVP Wednesday, July 15, 2009 1:39 PM
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.
- Marked as answer by Donna EdwardsMVP Wednesday, July 15, 2009 1:39 PM
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- Proposed as answer by Ibrahim Sukari Sunday, May 17, 2009 8:37 AM
- Marked as answer by Donna EdwardsMVP Wednesday, July 15, 2009 1:39 PM
Sunday, May 17, 2009 8:35 AM
All replies
-
This line in your form save event will cancel the save operation.
event.returnValue = false;- Proposed as answer by JuergenBeckModerator Thursday, May 14, 2009 4:09 PM
- Marked as answer by Donna EdwardsMVP Wednesday, July 15, 2009 1:39 PM
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.
- Marked as answer by Donna EdwardsMVP Wednesday, July 15, 2009 1:39 PM
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- Proposed as answer by Ibrahim Sukari Sunday, May 17, 2009 8:37 AM
- Marked as answer by Donna EdwardsMVP Wednesday, July 15, 2009 1:39 PM
Sunday, May 17, 2009 8:35 AM