RE: Pull data to ‘add new popup’ from the originating record in create mode
We have 2 custom records from a SuiteApp that our client has purchased.
In custom record 1, we have 2 drop down list fields for customer and for contract,
In create mode, a customer is selected. If the customer does not already have a contract, we have to add it. We do so using the ‘+’ button next to the contract field.
This opens our custom record 2: contract. Here we have a field for customer and some contract data fields.
Our client wants the customer entered in the 1st custom record to automatically follow to the contract and populate the customer field there.
Is this even possible? Since we are in create mode we do not have an id for the 1st custom record so we cannot just add a field to the contract that is linked to the 1st custom record and pull the data that way.
I was considering session.set and session.get, But I can only do that with a server side script.. And I need a client script to notice the field change on customer in custom record 1.
Seems like I can do it if I use a Suitelet to do the work. If I call the Suitelet from the Client Script and pass on the customer id, the Suitelet can do session.set and then a User Event can fetch the customer id with session.get on beforeLoad at the contract record.
A little workaround to get a seemingly easy thing done.. If anyone has a better solution, please let me know!