- 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-23-2019 07:33 AM
Hi Basantsoni,
I remember posting a reply to similar question yesterday from you.
What error you are getting? where you are stuck?
Regards
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 01:38 AM
Hi Ankur,
Thanks for your reply. For testing purpose we make this URL: var attachTaskLink = '<a href="https://avanadedev.service-now.com/ui_page.do?sys_id=8aee0f0c1b7c7f44932343fccd4bcb9f&sysparm_view=&...">' + 'Click here to acknowledge' + '</a>';
Where 1462fd9ddb8de340c20168d35b961974 is sysid of record. Onclick this hyperlink is opening UI Page with message without any issues.
After that, we are using below script in UI Page but still it’s not working
<?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="jvar_task_table" jelly="true">
var recordSysId = RP.getParameterValue('sysparm_sysId');
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.";
gcis.update();
}
</g:evaluate>
</j:jelly>
Thanks,
Basant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 02:01 AM
Hi Basant,
That is because in the url parameter is sent incorrect; only single & is required and not &&
href="https://avanadedev.service-now.com/ui_page.do?sys_id=8aee0f0c1b7c7f44932343fccd4bcb9f&sysparm_view=&...">' + 'Click here to acknowledge' + '</a>';
what do you get in the log for that in g:evaluate tag
gs.log("recordSysId is: " + recordSysId );
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-23-2019 08:12 AM
Hi Ankur, thanks for your reply.
Now, i can run server side to update our date into service now from HTML only. but how we can get information of ticket like sysid or number, something unique. so that we can use into glide query to query and update.