SavePostChange Event
After the Component Processor updates the database, it initiates the SavePostChange event. You can use SavePostChange PeopleCode to update tables not in your component using the SQLExec built-in function.
An error or warning in SavePostChange PeopleCode causes a runtime error. Avoid errors and warnings in this event.
The system issues a SQL Commit statement after SavePostChange PeopleCode completes successfully.
If you are executing Workflow PeopleCode, keep in mind that if the Workflow PeopleCode fails, SavePostChange PeopleCode is not executed. If your component has both Workflow and SavePostChange PeopleCode, consider moving the SavePostChange PeopleCode to SavePreChange or Workflow.
If you are doing messaging, your Publish PeopleCode should go into this event.
SavePostChange does not execute if there is an error during the save. For example, if there is a data conflict error because another user updated the same data at the same time, SavePostChange does not execute.
Important:
Never issue a SQL Commit or Rollback statement manually from within a SQLExec function. Let the Component Processor issue these SQL commands.
SavePostChange PeopleCode can be associated with record fields, components, and component records.
Related Topics