Related List: How to auto populate fields

ramandeepgarg6
Tera Expert

Hi Team,

If i have a form opened. This form contains a related list. In related list if i create a new form then its fields should be auto-populated from the current opened form. Please tell how to achieve this?

Capture.PNG

Regards

Ramandeep

1 ACCEPTED SOLUTION

Hi Ramandeep,



Only the field which refers to the parent table will be auto-populated if you want to populate some other field then some manipulation has to be done.


One thing you can do is have onLoad client script and since you already have a reference field to parent, using g_form.getReference() with callback you can auto-populate that.


you can try it out.




Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Sure Ramandeep.



Regards


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Thanks Ramandeep for marking the answer as correct.



Could you also mark it helpful and hit like. Thanks in advance.



Regards


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

 

I'm trying to achieve the exact opposite requirement. The fields in the related list should get populated in the current form.

 

I have Change request form which has Glide list fields Location, Department, Company and these fields should auto-populate all the companies, departments, locations of all the related Affected CIs. 

 

Please help. Any help will be appreciated.

 

Thanks,

Poonam