Pass variables between model driven app forms / entities.
I need to pass a value between forms in a model driven app. When my entity form loads I need to capture a value from the record and put it in a variable. The form also loads a subgrid of related records. When the user clicks on a related record, we navigate to the main form for that record. I need to have the variable that I populated from the original form to be available so that I can perform some business logic on the related record form. Can't find documentation on this.
I've tried putting the variable in the execution context with setSharedVariable and then getSharedVariable from the next form, however it says the variable is undefined even though I know it's not.