1 of 1 people found this helpful
I would generally use the script "go to related record" however, the relationship isn't related, as the portal needs to show all companies.
If the “relationship is not related”, how can you display a portal?
If “update” means “show the related record that the portal row represents in the current layout”, then do just that:
Go to Related Record [ from: Customer_Details_Search ; layout: <current layout> ]
A couple of things:
1. By "clone" I hope you don't mean you have duplicated the Company table. If so, don't. A separate TO (Table Occurrence) of the same table is all you need.
What you are actually trying to do is not entirely clear, at least to me. I assume you are on some activity layout to which you want to link a specific company. In that case
2. I assume the portal is working for you. To select a specific company from the portal you need a button contained entirely within a portal row to run the script, so that it references the row it is part of. The script itself needs to:
– use Set Variable to capture the kp_Company from that portal row
– close the popover
– use Set Field to insert this value into the relevant foreign key field (I assume you already have an active record before activating the popover from your Select button).