Perform an action before saving an item in SharePoint
Today’s skybow Advent Calendar cookie comes from user’s question in our Forum: how can a custom action be performed by clicking on the “Save” button, before actually saving the item? It could be sending an email, performing an additional form validation, or really anything you want.
- Open the form where you want to enhance your save operation, and switch to the “Behavior” tab in the Rich Forms editor
- Double-click the “Save” button. It will change from being a standard “Save” button to skybow’s “Button with actions” (available in skybow Solution Studio and skybow Rich Forms)
- The “new” save button will already have prepopulated “Save” and “Redirection” actions (to save an item and to redirect to the display form or list view after it)
- Add any additional actions – notifications, sending emails, advanced validation to that button. There are basically no boundaries here.
In the following example I will show an on-screen notification, and send an email with the information about the new purchase, but only if the total amount of the purchase is over 10000 $.
Note that the “Save” and “Redirection” actions have already been there after the button has been converted from standard to skybow button, I’ve added only the “Notification” and “Send Mail” actions.
All this in less than 2 minutes. Because skybow.