I have app A which links to app B as a mini, work app. I want to search for stuff in B, select a couple rows, and insert those rows back to a subtable on A’s pending transaction when I’m done. Can/should I:
Have a form action in B which applies my selections from B back to App A (and closes the mini app if possible)
Have something hooked up on mini-app close which applies my selections back to A
Something else entirely?
For either option, do I need to include the internal ID of A’s record on B so that I have something to fetch and update with, or is there another way to know that B is launched from A and map things back?
Seeking guidance on best practices. I don’t know what options I even have available here.
There isn’t an easy way to map this selection back. In my opinion, the easiest thing to do here is, on save of your Mini App (B), loop over the selected or filtered records and insert them into your subtable on the parent App (A). Let me know if you have more questions about how best to implement this.
Happy to help as well with some more specifics. If Mini App B is built over a work table, you’ll want the ‘inserts’ to be done via Action Block on save of the mini app. This will prevent any records created in the work table from trying to insert to the database and yielding an error.
There are a litany of other things that you can do, including a row action with the UI hint and logic actions to operate on selected rows. That would work well if you’re populating the list view or a subtable with records in the work table.
Depending on the scenario, you probably want the mini app to extend the parent app’s transaction boundary. This will mean that the action block applies on “Apply and (Exit/Stay/etc.)” and any changes in the child NATE container will be removed when selecting Cancel or Close.