- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2015 01:12 AM
Hi,
I need to get some values of the current record from UI Action on Related List of current record - how do I do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2015 10:10 AM
RP.isRelatedList() && typeof parent != "undefined" && parent.state== 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2015 01:20 AM
Hi Andrii,
You can query the related list record based on the relationship. For instance to query the change task record on the change form, we can try this.
var gr_change = new GlideRecord(change_task);
gr_change.addQuery('change', current.sys_id); //Here change will be the reference field on the change task form.
gr_change.query();
while(gr_change.next()){
//perform action
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2015 01:43 AM
Thank you, Sunil, for trying to help me, but I need opposite - get values from Related List of the current record. I know I may use Script Include, but I'm looking for alternatives.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2015 02:15 AM
Hi Andrii,
Try RP.getParameterValue('sysparm_query'), it should return you the sys_id of the current record that's being referenced in the related list. I believe you should be able to make your way from there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2015 10:10 AM
RP.isRelatedList() && typeof parent != "undefined" && parent.state== 5
