Item sharing
Opens the permission settings of one Item in your page. The widget saves the permissions itself and tells your page with the message applied or cancel.
The item-sharing widget sets who can open an Item, and gives people or groups a role on it. The widget saves the permissions through the platform itself. Your page does not call the API.
URL and parameters
The widget is at <site>/widgets/item-sharing. The parameters every widget takes are in Widgets.
| Parameter | Meaning | Required |
|---|---|---|
item_id | The _id of the Item to set permissions on. | Yes |
Messages
| action | Direction | payload |
|---|---|---|
applied | widget to your page | None. Sent after the permissions are saved. |
cancel | widget to your page | None. The user closed it without saving. |
This widget does not send ready and does not read post-widget-parameters. It sends error and close-with-error as in Widgets.
If saving fails, the widget shows its own error and does not send applied.
Example
embedParams is the common parameters from Widgets.
const params = new URLSearchParams({ ...embedParams, item_id: itemId })
frame.src = `${site}/widgets/item-sharing?${params}`
addEventListener('message', (e) => {
if (e.origin !== site || e.data.messageToken !== messageToken) return
if (e.data.action === 'applied' || e.data.action === 'cancel') frame.remove()
})Item list
Shows the Items of the kinds you choose as cards for the user to search and pick, and starts a new one. The result comes back as the messages select and create.
Data picker
Lets the user pick Records from a table or from the lookup data of a form. The result comes back as the message select with the Records that were picked.