- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2018 04:28 AM
Hi all,
I wanted to know how to make use of gel in servicenow.
Some of the lines I have come across:
1.
com = gel("activity-stream-comments-textarea"); if (com) com.focus(); return;
2. gel('sysparm_item_guid').value
so I wanted to know what are those values "activity-stream-comments-textarea" and ''sysparm_item_guid'"
how and where those values can be found and used.
any other simple example to make use of gel would be greatly helpful
thanks in advance 🙂
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2018 04:47 AM
Hi Shanks,
So avoid using if you can but if you absolutely must, then see these useful articles for full description of use/issue:
https://snprotips.com/blog/2017/7/21/how-to-enable-dom-manipulation-in-the-servicenow-service-portal
http://www.snc-blog.com/2011/03/03/altering-the-dom-document-object-model-with-javascript/
Regards,
Paul
Regards
Paul

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2018 04:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2018 04:39 AM
Hi Rahul,
Yes I know that its not recommended. but I just wanted to know how it works.
How can I get the element ID of a particular field.
TIA

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2018 04:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2018 04:47 AM
Hi Shanks,
So avoid using if you can but if you absolutely must, then see these useful articles for full description of use/issue:
https://snprotips.com/blog/2017/7/21/how-to-enable-dom-manipulation-in-the-servicenow-service-portal
http://www.snc-blog.com/2011/03/03/altering-the-dom-document-object-model-with-javascript/
Regards,
Paul
Regards
Paul