- 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-05-2015 07:33 AM
Business rule
After
update/ insert
table - remediation
condition
current.risk!=''
script
var gr=new GlideRecord('risk')
gr.addQuery('sys_id', current.risk);
gr.query()
if(gr.next())
{
gr.risk_field=current.some_field;
gr.update()
}
i have assumed that the table names are risk and remediation
on the remediation table there is a field called risk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2015 07:53 AM
How did you dot walk the fields? The info should just populate based on the current record if you used the green plus to dot-walk in the form layout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2015 08:13 AM
Anurag- I will see if I can get that script to work , but shouldn't the business rule be on the risk table instead of remediation?
Mike Allen- I did use the green plus sign in form layout to choose the correct remediation fields, but no data populates until I manually choose the record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2015 08:18 AM
is should be on the remedation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2015 05:42 AM
Anurag,
I tried doing your suggestions on a demo instance. I can see that I am getting the correct remediation number using gs.addInfoMessage(current.number);
, but it is not populate in the reference field. Am i missing something simple?
After
update/ insert
table - grc_remediation
condition
current.risk!=''
var gr=new GlideRecord('grc_risk')
gr.addQuery('sys_id', current.grc_risk);
gr.query()
if(gr.next())
{
gr.u_risk_remediation=current.number;
gr.update()
}