How to get the Url of the current record in business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 01:25 AM
Hi
how to get the URL of the current record in business rule which i will be passing in the Rest message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 01:32 AM
Hello @Akash Kajro ,
Can you try this in your BR
gs.getProperty("glide.servlet.uri") + gs.action.getGlideURI();
Hope this helps
Mark the answer correct if this helps you
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 01:35 AM
Hi @Akash Kajro
You can try this to build the URL of the record
var url= 'https://'+gs.getProperty('instance_name')+'.service-now.com/incident.do?sys_id='+current.sys_id;
replace incident with the table name.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2024 01:52 AM
Hi Voona,
Where you have 'instance name', what happens when I move the BR to Test then to Prod as the instance will redirect to dev? Is this correct?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2024 02:19 AM
Hello @Gugu M ,
Instance name will be automatically picked by system property.
This system property contains different value for each instance.
Hope it helps.
Regards,
Shubham