Preview is not available for a child reference field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2025 05:26 AM
Hi community,
I have a form where I want to autopopulate a reference field (Country/Location) in the child form using the value from a different reference field (Home Country/Location) from the parent form.
Home Country/Location is a reference to the core_country table, while Country/Location is a reference to the cmn_location table.
I'm able to pass the core_country value through a Script Include and Client Script, but when I set that value directly using g_form.setValue('location', pipeData.homeCountryLocation) , it populates the field value but shows "Preview not available" on the form.
I understand this is because the sys_id is from core_country, not cmn_location.
✅ What is the best way to match the core_country record to a cmn_location record (by country name or any other logic) and then populate the correct value into the Country/Location field on the child form so the preview works properly?
Thanks for help in advance
kriti

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2025 06:40 PM
@kritsharma Except matching the Country name with the location name column in cmn_location there is no way you can get the sys_id of a cmn_location record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2025 11:49 PM
What about preview is not available for that you have any other solution to auto populate the country/location and preview also available

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2025 06:55 AM
@kritsharma Instead of returning the sys_id of the core_country record, you need to return the sys_id of a record from the cmn_location.