YfcDoNotPromptForChanges

Description

This JavaScript function turns off the automatic prompts that remind the user to save changes to their data. By default on any screen, if a user enters data and then starts to navigate away without saving the data, the Presentation Framework catches this and alerts the user to save their data.

When you call this function it sets a parameter on the window object. This parameter is checked during the onunload event and if the parameter is set through this function, the user is not warned.

When you call this function to turn off prompting, all data in the screen is passed to the API during save.

This JavaScript function does not turn off the prompts that remind a user to save changes to their data when executing inner panel actions.

If you call an API on an inner panel and do not want the user to be prompted to save changes, you must also use either the yfcSetControlAsUnchanged or the yfcDoNotPromptForChangesForActions function.

Syntax

yfcDoNotPromptForChanges(value)

Input parameters

value - Required. Determines whether or not the user should be prompted to save any new data they have input that has not yet been saved. Valid values are true and false. If specified as true, the user is not prompted to save. If specified as false, the user is prompted to save the data.

Return value

None.

Example

This example shows how this function turns off the automatic prompts for the manifest detail screen.

<script language="javascript">
yfcDoNotPromptForChanges(true);
</script>