Is there a way to populate data from a related list into the current form?

kenduong
Kilo Contributor


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.

1 ACCEPTED SOLUTION

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()


}


-Anurag

View solution in original post

14 REPLIES 14

Mike Allen
Mega Sage

You can add some dot-walk fields to the form in a section.


I have created dot-walk fields into the form but the data is not being populated. I have to manually find the reference record and select the correct record for the data to populate. What would the best way to get the correct related list record?


Anurag Tripathi
Mega Patron
Mega Patron

Hi Ken,



Clearly you have fields on the risk form that you want to modify when the related list(related record) on that form is updated.


What you can do easily is write a Business Rule on the related record's table.


After Update


Verify that this particular record is related to a valid Risk form and


in the script part you can find the Risk record and update its fields accordingly....



make sense?? did i confuse everyone


-Anurag


I am not sure what you mean . I have one risk and that risk will have one remediation. I can see that remediation record information on a related list. I want to be able to see that remediation information on the risk form in a section I created.



I currently have the remediation fields dot walked on the risk form, but the data does not populate until I select the correct remediation record via reference field.



Is there a way to autopopulate the remediation reference field based on the related list record?