I have a lookup field (entity name X) on main form Y which is prepopulated with the value. I want to create a new record for this lookup X and populate the subgrid Z values which is a related child entity of main form Y to newly created lookup record . Entity Z is also a related child entity for X and present as subgrid on X main form.
Can I get javascript or plugin sample code?