Share Links Functions
These functions are available with the <sharebutton>
GetShareLinkForCurrentView
|
No parameters |
Returns a shared link URL for the current view. The same output that is copied to the clipboard when a user clicks the <sharebutton/> |
Example
Copy Code
<script>
const sharedUrl = BoardScript.GetShareLinkForCurrentView();
console.log('The sharable URL is ', sharedUrl);
</script>
GetShareLink
Get the share link for an arbitrary board view/record.
|
args |
object |
Single parameter object for specifying board/view/dataid/incident. Copy Code
|
|
callback |
#optional |
Result can be received via callback or async/await Promise return. |
| returns | object |
Copy Code
|
Example
Copy Code
<script>
const args = {
boardName: "My Board",
viewName: "My List View",
incidentName: "My Incident"
};
// callback
BoardScript.GetShareLink(args, function (result) {
console.log('Url is:', result.url);
console.log('Error is:', result.url);
});
// async/await
const result = await BoardScript.GetShareLink(args);
console.log('Url is:', result.url);
console.log('Error is:', result.url);
</script>