Gel function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2015 08:50 AM
Hi All
1)When I use code like this what does it essentially mean?
2)What are these "sys_display" , "sys_uniqueVaule" ? are there any more of them? can I get a link of there description?
gel('sys_display.ecc_agent').value = Name;
sysId = gel('sys_uniqueValue').value;
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2015 08:58 AM
Hello Diplesh,
gel is a shortcut for document.getElementById (Docs of the function Document.getElementById() - Web API Interfaces | MDN)
sys_display.ecc_agent is the value for the id attribute of an element in the DOM. Same goes to sys_uniqueValue
.
You can use DOM inspector to get the exact id of the element you want to match.
EDIT: sys_uniqueValue is the id for an element that contains the sys_id of the current form
so you could use the following code to get the sys_id of the current record:
var sysid_gel = gel('sys_uniqueValue');
var sysid = sysid_gel.value;
sys_display.ecc_agent is most likely a field in the form
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2015 09:09 AM
When an id is prefixed by "sys_display", it is usually a reference field.