update Method
You can use the update method to update Oracle Field Service entities through a plug-in, without leaving the plug-in's page.
- update messages may be sent by the plug-in multiple times before closing. However, the plug-in cannot send the next update message until the previous update is applied and the updateResult message is sent to the plug-in.
- The plug-in page is not closed after applying of update message and its iframe is not destroyed.
- The message fields wakeupNeeded, backScreen, backActivityId, backInventoryId, backPluginLabel, backPluginButtonId, backPluginOpenParams, and iconData are ignored.
- Upon successful processing of the update message, Oracle Field Service sends a message with the updateResult method.
If the validation or processing of the update message fails, the Plugin API sends the "error" message of same format (with the same "type" and "code" values) that is sent for the close message.
If a user has to stay on the plug-in page after applying the updates, the best practice is to use the update method instead of close. This improves the user experience and reduces the consumption of the device's resources (RAM and CPU), as the plug-in page won't be recreated and the plug-in doesn't have to process the open data again.
Example of the update method:
{
"apiVersion": 1,
"method": "update",
"activity": {
"caddress": "Cleveland",
"aid": "4224031"
}
}