SetComponentChanged

Mon 01 January 2018

Syntax

SetComponentChanged()

Description

Use the SetComponentChanged function to set the changed flag for the component. This flag is used to determine if save processing is needed or not, when the user clicks Save, or save is triggered through DoSave PeopleCode. This flag is also used to determine if a save warning needs to be issued to the user when they leave the component.

Using SetComponentChanged causes full save processing to occur the next time a save is triggered. This includes the SaveEdit, SavePreChange, Workflow, and SavePostChange events. This function can be used to replace a workaround of changing a field to a different value then back to force save processing.

Using SetComponentChanged does not cause unchanged data to be saved. The Component Processor only saves changed data to the database. If nothing in the component has been changed, nothing is saved to the database.

After save processing has completed successfully, the flag is cleared.

Most components do not need to use this function. The changed flag is automatically set when the user changes any value in the component, as well as when PeopleCode changes a database field buffer value. This function is for certain pages that have a requirement to have save processing execute even if the user has not changed a value.

Note: Using this function causes a save warning to be issued to the user when they try to leave the component, assuming the save warning feature is enabled, and the end user has not saved the component since the function was called.

Using SetComponentChanged before DoSave forces save processing to occur.

Parameters

None.

Returns

None.