Field Events Tab
Example: profile.Invoice_Amount (for a profile field called \"Invoice Amount\"). Remember that all object names are case sensitive. You can test the script by providing test values in the Profile Input section on the left and then by clicking on the Test Script button. Output profile values will be displayed in the Profile Output section on the right. You can view the output XML by clicking on the View Output button. Click here to get the list of PaperSave Variables that can be used while executing script.
|·||OnEnter Event: when the Profile Field is selected.|
|·||OnChange Event: when the Profile Field value is changed.|
|·||OnExit Event: when the Profile Field is exited.|
When you use profile.Field_Name in the Lookup query it will replace the value with quotes. If you want to use the value for the table name or column name only without changing the quotes, then you must use square brackets such as [profile.Field_Name]. This feature also supports number and date conversion for SQL queries.
|q||Generating Custom Error Message from Script Editor:|
PaperSave gives you the ability to generate custom error message by writing a script in script editor window in below given format:
throw new Error("<message text>")
You can write the script as given in below example:
if(<condition if true>)
throw new Error(<"My Exception Message">);
Tip: Press F1 to open the current function with the User Guide.