Monday, February 16, 2009

PreSaveAction to EditForm.aspx

The creators of that script added a “hook” for custom validation called PreSaveAction. This function gets called during the submit action but was never defined so we can create our own. We have a simple strategy: identify Tasks surfaced through our Linked Tasks web part and stop the submit action if Issue status = ‘Closed’ and number of Tasks > 0. Translating that “simple” logic into javascript takes patience and testing. Add the PreSaveAction to the EditForm.aspx page

No comments: