AbortSave(action As String)

 

Cancel a user's save action.

 

When a SAVE REGISTRATION event occurred (user hits the SAVE button on the registration window) then a special XojoScript is invoked before the saving of the record.

 

From the Registration Save Script one can call AbortSave in order to cancel the saving of a registration (from WindowLink only).

 

To edit the Registration Save Script :

 

1.     Select 'Register' from the menu Edit (or click the Link button on the Toolbar)

2.     Select menu 'Script -> Edit Special Scripts' -> 'Registration Save Script'

 

 

From such a script we can implement customer specific business rules, like not allowing saving of records with incomplete data.

 

Parameters :

 

Name

Value

Description

action

"TRUE"

Cancel saving of a registration

"YES"

Cancel saving of a registration

 

"*"

Any parameter string other than YES or TRUE will allow saving.

 

Available in:

 

WindowMain

WindowLink

NO

YES

 

Used in:

 

XojoScript Name

GUID

Registration Save

95550A45-7C95-4C42-A9FD-9AFABB4FEEAD

 

Example Code:

 

If (IsLinkMode = 1) Then

If GetActiveLinking = "link_adr_evt" Then

 

If GetText("imPO_lnk_p01_Participation") <> "Confirmed" Then

MsgBox("Set status to confirmed in order to save this registration!")

AbortSave("TRUE")  // Cancel Saving of registration

End If

 

End If // GetActiveLinking = "link_adr_evt"

End If  // IsLinkMode = 1