- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2019 05:03 AM
Hello Friends,
Please help me here, from emails hyperlinks we are opening a UI Page and updating table records.
How do get ticket information to query into table and update tickets in UI Page.
Thanks,
Basant
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 03:23 AM
Hi Basant,
So url is coming proper.
can you try this to get the value of url parameter sysparm_sysId
var recordSysId = gs.action.getGlideURI().getMap().get('sysparm_sysId')
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 02:31 AM
Hi Ankur, thanks for your reply.
I updated URL and UI Page with log, but still no positive result.
Below is Mail Script Code :
var attachTaskLink = '<a href="https://avanadedev.service-now.com/ui_page.do?sys_id=8aee0f0c1b7c7f44932343fccd4bcb9f&sysparm_view=&sysparm_sysId=1462fd9ddb8de340c20168d35b961974">' + 'Click here to acknowledge' + '</a>';
template.print(attachTaskLink);
Below is UI Page code :
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<h1> ${gs.getMessage('Thank you for acknowledging this referral')}</h1>
<td align="right">
<g:dialog_buttons_ok_cancel ok="return onOK();" cancel="return onCancel();" ok_type="button" cancel_type="button"/>
</td>
<g:evaluate var="sysparm_sysId">
var recordSysId = RP.getParameterValue("sysparm_sysId");
gs.log("recordSysId is: " + recordSysId);
</g:evaluate>
<g:evaluate var="jvar_user" object="true" jelly="true">
var gcis = new GlideRecord('u_gcis_request');
gcis.addQuery('sys_id',recordSysId);
gcis.query();
if(gcis.next()){
gcis.u_acknowledgement_received = 'true';
gcis.u_acknowledgement_date = new GlideDate();
gcis.u_referral_notes = "THis is New Test update from UI Page load new for testing again.";
gcis.update();
}
</g:evaluate>
</j:jelly>
I checked in the logs, and found nothing,
recordSysId is:
appreciate your help on this. but still i'm struggling to fix this issue.
thanks,
Basant Soni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 02:59 AM
Hi Basant,
try this in g:evaluate tag to check what url is coming up:
gs.log(gs.action.getGlideURI().toString());
also where is this being opened? i.e. how is the user opening this? is it from the outlook
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 03:13 AM
Hi Ankur, thanks for your reply.
Yes, this'll be opne by users from thier outlook. but now i'm opening this url from preview notifications.
i'll put both logs in UI Page and below are results :
ui_page.do?sys_id=8aee0f0c1b7c7f44932343fccd4bcb9f&sysparm_sysId=1462fd9ddb8de340c20168d35b961974&sysparm_view=
Mail Script:
var attachTaskLink = '<a href="https://avanadedev.service-now.com/ui_page.do?sys_id=8aee0f0c1b7c7f44932343fccd4bcb9f&sysparm_view=&sysparm_sysId=1462fd9ddb8de340c20168d35b961974">' + 'Click here to acknowledge' + '</a>';
template.print(attachTaskLink);
thanks,
Basant SOni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 03:23 AM
Hi Basant,
So url is coming proper.
can you try this to get the value of url parameter sysparm_sysId
var recordSysId = gs.action.getGlideURI().getMap().get('sysparm_sysId')
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 04:04 AM
Hi Ankur,
thanks for your reply. Finally in logs sys id came.
thanks again for all help as a community member.