- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 12:30 AM
Dear Team,
I am working on an email script to create a button but failed to do so, currently, I am stuck with somewhere as shown below:
Desired Format of Email Notification:
Hi (requestor name),
We created REQ00XXXXX to handle your recent request.
You can view your request to track updates and make changes.
View request(button)
About this request
Requested item number: RITM00XXXXXX
Short description:
Requested for:
Thank you,
IT Support
Please note this notification is on the sc_request table.
As of now output (preview notification) is something like this:
For the yellow highlighted section, I am stuck, there must be a Button 'View RITM' when we click on the button it redirects to the respective RITM record. Currently, here is the Link to RITM0153220 as shown in the screenshot which also redirects to that RITM record. But the requirement is the 'View RITM' button.
Please find the email script which I have used so that the current RITMXXXXXX link is showing (in the above screenshot) on the notification:
var gr = new GlideRecord("sc_req_item");
gr.addQuery("request", current.sys_id);
gr.query();
while(gr.next()) {
template.print('<a href="' + gs.getProperty('glide.servlet.uri') + gs.generateURL('sc_req_item', gr.sys_id) + '">' + gr.number + '</a>');
}
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 12:51 AM - edited 12-05-2023 12:53 AM
Regards,
Prashant Ahire
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 12:51 AM - edited 12-05-2023 12:53 AM
Regards,
Prashant Ahire