Hello everyone
I am trying to get the data of a related record that i select in a lookup. So when the lookup field is selected, that the entire form gets filled up with the data that comes from that related record in the lookup field. Can anyone help me to fix
Solved! Go to Solution.
Hi @jorenchristiaen,
Do you need to save the same data from the related record, or do you just need to view the related data? If you just need to view related data, you could create a Quick View form for the related table and add it to your form. The quick view form would show up whenever the Lookup has a selected record populated.
If you need to populate data from a related entity, you can define Attribute Mappings on the 1:N relationship. If on the related record form you have a subgrid to this entity and click + (Add New), when it opens the create new form it will pre-populate the values of the related record including the lookup. Note that this will not auto-populate if you are just creating a new record without coming from the related record.
The other way to populate the fields is with a JavaScript web resource, registered to the OnChange event of the Lookup field. You would retrieve the related record using the Lookup value selected. Then you can set the form values using the related record you retrieved.
---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.
Hi @jorenchristiaen,
Do you need to save the same data from the related record, or do you just need to view the related data? If you just need to view related data, you could create a Quick View form for the related table and add it to your form. The quick view form would show up whenever the Lookup has a selected record populated.
If you need to populate data from a related entity, you can define Attribute Mappings on the 1:N relationship. If on the related record form you have a subgrid to this entity and click + (Add New), when it opens the create new form it will pre-populate the values of the related record including the lookup. Note that this will not auto-populate if you are just creating a new record without coming from the related record.
The other way to populate the fields is with a JavaScript web resource, registered to the OnChange event of the Lookup field. You would retrieve the related record using the Lookup value selected. Then you can set the form values using the related record you retrieved.
---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.
Thanks for the question and answer both. It helped me to solve my problem.
For second solution that you have given I have written simple js code and put it to field OnChange Event.
Thanks for the question. It wanted to do same thing.
For second solution that you have given I have written simple js code and put it to field OnChange Event.
Any chance you could elaborate on how to use this Js? im really struggling to get it to work 🙂
Thanks!
User | Count |
---|---|
19 | |
15 | |
14 | |
10 | |
8 |
User | Count |
---|---|
40 | |
30 | |
23 | |
21 | |
16 |