Thank for the reply Nikita - I want to try to explain better.
Attached is a screenshot of the master new form.
- When a user adds a detail ('related items1'), the fields (with red box) "Material Short Text" and "Material Long Text" are empty.
- Unfortunately it is vital for the user to see these two field in the master new form - before they save the master.
- But today these two fields are populated with a workflow. The string for both field is created from several "additional lookup fields" that are in the detail list - so I need to stop using the workflow and do this in the form.
The problem with creating the strings in the 'detail new form':
- When I create a 'detail' and select from the lookup fields, the "additional lookup fields" do not populate until the 'detail new form' is saved. So I can not use javascript to create the string in the 'detail new form'. Unless there is a way to refresh the 'detail new form' so the 'additional lookup fields' populate?
- I can not save the 'detail new form' and redirect to 'detail edit form' to create the string, because then I loose my master detail connection.
So I need to find a way to create the strings in the 'master new form':
- I added an additional 'related items2' to the form - but I hide it with js. It is a duplicate of 'related items1' but the view only displays the 'additional lookup fields' that I need to build the strings.
- When I add a new detail and return to the 'master new form', this hidden 'related-items2' refreshes and shows all the values I need to create both strings.
- I use js to loop through the hidden 'related-items2' and get the values I need to create my two strings.
So the final step is where I am stuck:
How can I loop through the previous 'related items1' and insert the string into "Material short text" and "Material long text"?
I have the string ready, I just need a way to populate these two fields in each detail in 'related items1'.
Final outcome
- The user can see "Material short text" and "Material long text" for each detail in the 'master new form'.
- The user can save the 'master new form'
- skuMasterDetail.jpg (113.86 KiB) Viewed 1907 times