Image CWR Mobility Wiki
This page is a Draft, its content is not complete and might contain errors.

This article applies to:
  • CWR Mobile CRM 4.2

In version 4.2 of the CWR Mobile CRM client it is possible to create custom forms using the SDK and integrate these in the Panelstack.

Edit

PanelStack and CwrPanel

The panel stack is the navigation controller in the CWR mobile client. This handles the forwards and backwards navigation in the client. Forms being displayed must inherit from the CwrPanel control, this offers the basic layout of a standard CWR Mobile CRM form.

Edit

Accessing the panel stack

The panel stack is exposed via the SdkContext object, this is a singleton class which exposes system functionalities including an IPanelStack. The IPanelStack interface has three navigation method (NavigateTo, NavigateBack, NavigateHome) and methods to open standard forms and views (OpenForm, OpenView, OpenRelatedView).

Edit

Implementing a custom Panel

All that is needed to implement a basic custom panel is to inherit from the CwrPanel class.

There are four important methods which are related to navigation in the panel stack. The OnShowPanel method is called just before the panel is being shown to the user in a NavigateTo operation. The OnHidePanel method is called before the panel is closed by a NavigateBack operation and allows the navigation operation to be canceled.
If the panel is cached and re-used to display different record (the standard list and form panels do this). The SaveState method can be used to store state for the current panelstack instance. The LoadState method can be used to load this data back into the instance. These methods are only called if another panel is opened from this panel. So they only need to be implemented if a navigation action is initiated by this form (By calling the NavigateTo method) and the form is cached and re-used. Custom forms are not cached by the standard application.

Edit

Customize panel navigation

To control the behaviour of panel navigation it is possible to bind to the PanelChanging and PanelChanged events on the PanelStack. These events are called for every navigation operation that occurs, including those between system panels. The PanelChanging event does allow the operation to be canceled.

Edit

See Also

ScrewTurn Wiki version 2.0.35. This Wiki contains 64 pages.