diff --git a/Server-Side Components/Server Side/Record as Link/README.md b/Server-Side Components/Server Side/Record as Link/README.md new file mode 100644 index 0000000000..659a3e48d8 --- /dev/null +++ b/Server-Side Components/Server Side/Record as Link/README.md @@ -0,0 +1,21 @@ +# Record as a Link Utility + +The **Record as a Link Utility** is a versatile tool designed to dynamically render records as clickable links in any HTML field for any table. This utility allows you to choose specific fields to display, making it ideal for use cases such as notifications, generating PDFs, and more. + +## Features + +- Dynamically render records based on selected table and fields. +- Generate clickable links for seamless navigation. +- Compatible with various use cases like notifications, reports, and document generation. + +## Use Cases + +- **Notifications**: Display dynamic links to records in notification messages for any record in serviceNow +- **PDF Generation**: Embed clickable record links in generated PDFs. +- **Custom Applications**: Use in any HTML field to enhance interactivity. + +## How to Use + +Use the utility as used given code and merge it with other html. example attached for reference. + + diff --git a/Server-Side Components/Server Side/Record as Link/example-pdf-generation.js b/Server-Side Components/Server Side/Record as Link/example-pdf-generation.js new file mode 100644 index 0000000000..4cb6c5acae --- /dev/null +++ b/Server-Side Components/Server Side/Record as Link/example-pdf-generation.js @@ -0,0 +1,20 @@ +var recordToLinkUtil = new RecordToHTML("incident", "1c741bd70b2322007518478d83673af3", +"incident: ${number}-${short_description}",true); + +//Adding link as html + var html = '