- Mobile Plug-in Framework
- Add a plug-in to a page
Add a plug-in to a page
You add a plug-in to a context layout page, so that Mobile Workers can open it. You can configure the parameters for a button to send the parameters to the plug-in, or to open a specific page, or another plug-in.
- 1. Click Configuration > User Types.
- Select the type of user for which you want to add the plug-in.
- Click Screen configuration.
-
Find and click the page to which you want to add the plug-in.
The Visual Form Editor page appears. Plug-ins are available not only on the Visual Form Editor, but on old context layout structures such as Parts Details as well. On such pages, add an action and select a plug-in from the list.
- Drag-and-drop the Button element
to the section from where you want to invoke the plug-in.
Note: You cannot add buttons to context layout structures that are responsible for changing the state of an activity, simultaneously with submitting data. Some of the context layout structures where you cannot add buttons are Add activity, Not done activity, Install inventory, End activity. Further, you cannot remove or change the visibility of the two predefined buttons on these pages: Dismiss and Submit. This is to preserve the data integrity within transitions between states.
- Click the button.
- In the Standard action screen field, click the pencil icon.
- Select Plug-ins.
- In the Screens list, select the
name of the plug-in that you want to open and click OK.
The label of the plug-in is displayed in the Plug-in field. By default all plug-ins have a visibility of Read-only.
- In the Visibility section, add the conditions based on which the plug-in is visible.
-
In the Translations section, add a name for the plug-in.
[Optional]
This name is displayed on the page from which the plug-in will be invoked. This screenshot shows the Visual Form Editor page where a plug-in is added to a Button element:
If you retain the default name and if you happen to change the name of the plug-in later, the new default name is populated automatically.
- To configure the parameters:
- Click Add new in the Parameters section.
- Enter a name for the parameter in the Name field.
For example, enter defaultScreen to define a page as the default page in the plug-in. The maximum length of the name that you can enter is 248 characters.
- Enter a value for the parameter.
For example, enter part_order to display the Part order page as the default page in the plug-in. The maximum length of the value that you can enter is 4000 characters.
- Click Save.
- Repeat the procedure for all the parameters that you
want to configure.
The total combined length of all parameter names and values must not exceed 5000 characters. These parameters are not encrypted when sent to the plug-in.
-
Click Save on the Visual Form Editor
page.
The plug-in is added to the selected page.