Overview
The shareEntityRecord action provides a unified interface for sharing a specific record from your application's data model. Depending on the platform and shareMode, it either:
Opens the native OS share sheet (iOS/Android) — letting the user choose to share via WhatsApp, email, SMS, clipboard, or any installed app.
Copies a shareable URL to the clipboard (web,
shareMode: "copy") — with a success notification.Triggers the Web Share API (web,
shareMode: "native-sheet") — available on Chrome for Android and Safari on macOS/iOS 15+; falls back tocopyon unsupported browsers.
Parameters
| Parameter | Type | Required | Default | Description |
| entityId | string | Required (required) | — | The primary key of the record to share. Accepts bindings — typically bound to a row's ID field: {{ row.id }} or {{ ds_fetchOrder.response.orderId }}. |
| entityType | string | Optional (optional) | — | A human-readable type label used in the share sheet title and link preview metadata. Examples: "order", "ticket", "invoice", "lead". Displayed as "Share [entityType] #[entityId]". |
| shareMode | "link" | "native-sheet" | "copy" | Optional (optional) | "native-sheet" | link generates and returns the shareable URL as a variable without opening any share UI — use when you need the URL for a custom UI. native-sheet opens the OS or browser share sheet. copy copies the URL to the clipboard and shows a brief confirmation. |
| linkTemplate | string | Optional (optional) | App deep link | URL template for the shareable link. Use {{recordId}} as the placeholder — the action substitutes it with the resolved entityId value. Example: https://app.company.com/orders/{{recordId}}. If omitted, the action uses the app's configured deep link pattern from App Settings → Sharing. |
| subject | string | Optional (optional) | — | Email subject line pre-populated when the user chooses to share via email. Supports bindings. Example: "Order #{{ row.orderNumber }} from {{ appConfig.companyName }}". |
| text | string | Optional (optional) | — | Body text pre-populated in the share sheet alongside the link. Useful for adding context: "Hi, here are the details for your order. Tap the link to track your delivery." |
| outputVariable | string | Optional (optional) | — | When shareMode is "link", stores the generated URL in this page variable ID for use in subsequent actions or UI bindings. |
Link Generation
The linkTemplate is resolved as follows:
The
{{recordId}}placeholder is substituted with the URL-encoded value ofentityId.Any additional bindings in the template string are resolved against the current page state.
The resulting URL is used as the share target for the native sheet, clipboard copy, or stored in
outputVariable.
If no linkTemplate is provided, the action uses the pattern configured in App Settings → Sharing → Default Link Template. If that is also unconfigured, the action logs a warning and uses a fallback of the app's base URL.
Step-by-Step Usage Guide
Configure the default link template (optional): In App Settings → Sharing, set the default link template:
https://yourapp.com/records/{{recordId}}. This saves you from specifying it in every action instance.Add a share button to your table or card: Inside a Repeatable or Table row, add an Icon Button with a share icon. In its
onClickevent, add a Share Entity Record action.Configure the action: Set
entityIdto the row's ID binding (e.g.{{ row.id }}),entityTypeto a human-readable label, andshareModeto"native-sheet"for mobile or"copy"for web-first apps.Add a success notification for copy mode: For
shareMode: "copy", chain a Show Notification action (type: "success", title:"Link copied to clipboard") after the share action to confirm the copy to the user.
Examples
Share an order via native sheet
{ "actionType": "shareEntityRecord", "payload": { "entityId": "{{ row.orderId }}", "entityType": "order", "shareMode": "native-sheet", "linkTemplate": "https://shop.example.com/orders/{{recordId}}", "subject": "Order #{{ row.orderNumber }} details", "text": "View your order details and track delivery using the link below." } }
Copy a support ticket link to clipboard
{ "actionType": "shareEntityRecord", "payload": { "entityId": "{{ row.ticketId }}", "entityType": "ticket", "shareMode": "copy", "linkTemplate": "https://support.example.com/tickets/{{recordId}}" } }
Generate a link URL and store for custom sharing UI
{ "actionType": "shareEntityRecord", "payload": { "entityId": "{{ var_selectedLeadId }}", "entityType": "lead", "shareMode": "link", "linkTemplate": "https://crm.example.com/leads/{{recordId}}", "outputVariable": "var_shareableLeadUrl" } } // Next action: set it as the src of a QR code block { "actionType": "controlBlockMethod", "payload": { "blockId": "b_qrCode", "methodName": "setUrl", "methodPayload": { "url": "{{ var_shareableLeadUrl }}" } } }