- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2016 12:38 PM
I have an scenario where i need to query incident and extract sys_created_on value and put into a string variable.
Read the DateTime API's still not able to achieve this for UI page (client script).
Tried trouble shooting with debug and I get the alert "Before Declare" and not the second alert. Is there any issue with the declaration?
Any helps on this is much appreciated.
Client Script of UI page
function validateComments() {
var gdt1 = '';
var gr = new GlideRecord('incident');
gr.addQuery('active','true');
gr.query();
while(gr.next()){
alert('Before declare');
var glideDateTime = new GlideDateTime(gr.sys_created_on);
alert('after decalring');
gdt1 = glideDateTime.getValue();
gs.log('str gdt1' + gdt1);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2016 12:46 PM
No, GlideDateTime will not work client side. You will have to resort to GlideAjax and Script Includes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2016 12:46 PM
No, GlideDateTime will not work client side. You will have to resort to GlideAjax and Script Includes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2016 12:52 PM
Thanks Mike for letting me know that. You saved a lot of time!!!