Parameter | Description |
---|---|
NavigateData (ByRef) | Filled navigation data struct, passed by reference so it can be altered. |
hoInvokingView | Object handle of the invoking view |
hoInvokingObject | Object handle of the invoking object |
bCancel (ByRef) | Set to True to cancel the navigation. |
Procedure OnNavigating tWebNavigateData ByRef NavigateData Handle hoInvokingView Handle hoInvokingObject Boolean ByRef bCancel
This message is sent as part of the navigation process when navigating into a view or the view being navigated into. It is only sent when navigating forward (NavigateForward / NavigateBegin / NavigatePath / NavigateForwardCustom) and when deep link is opened. This message is sent when all navigation details are determined but before the navigation is actually performed. It provides the last chance to alter the navigation data or to cancel the navigation.
Note that the view is not yet initialized and likely is not in sync (so using client web properties inside the view is not possible).
This sample shows how to cancel the navigation based on certain conditions determined by the navigation data.
Procedure OnNavigating tWebNavigateData ByRef NavigateData Handle hoInvokingView Handle hoInvokingObject Boolean ByRef bCancel If (hoInvokingView = oSelectOrdersByCustomer) Begin Send FindByRowId of oCustomerDataDictionary (RefTable(Customer)) (DeserializeRowID(NavigateData.sRowID)) If (Customer.Name contains "America") Begin Move True to bCancel Send UserError "American customers shouldn't be edited!" End End End_Procedure