- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2015 06:18 AM
Hi All,
I am trying to populate data from the related list remediation into the risk form. I want to see the complete view of risk and remediation on the same view.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2015 06:27 AM
Hi Ken
Use this, i hope this works
After
update/ insert
table - grc_remediation
condition
current.risk!=''
gs.addInfoMessage('started');
var gr=new GlideRecord('grc_risk')
gr.addQuery('sys_id', current.parent);
gr.query()
if(gr.next())
{
gs.addInfoMessage('Came here');
gr.u_risk_remediation=current.sys_id;
gr.update()
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2015 05:45 AM
Can you just give a description of the fields and their types used in the script
grc_risk (i assume this is a table and there is a field also of the same name on grc_remediation)
u_risk_remediation...type?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2015 05:57 AM
grc_risk and grc_remediation are both tables we are currently working on.
u_risk_remediation(on grc_risk table) is a reference field that reference grc_remediation. The number field is the field that is automatically generated by the table. There is no u_risk_remediation field on grc_remediation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2015 06:03 AM
current.grc_risk
what is the grc_risk here, its a field on grc_remediation ??
i want to know how are the 2 tables related
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2015 06:21 AM
these tables were creating by a ServiceNow plugin ITGRC. This is the relationship that was created between the two tables by the plugin
current.addQuery('source_table', "grc_risk");
current.addQuery('source', parent.sys_id);
source is a document ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2015 06:27 AM
Hi Ken
Use this, i hope this works
After
update/ insert
table - grc_remediation
condition
current.risk!=''
gs.addInfoMessage('started');
var gr=new GlideRecord('grc_risk')
gr.addQuery('sys_id', current.parent);
gr.query()
if(gr.next())
{
gs.addInfoMessage('Came here');
gr.u_risk_remediation=current.sys_id;
gr.update()
}