Creating an associated object from a parent object page

0
What would be the best approach in creating a list of child objects from a parent object new_edit page? For example, I have a work order main page as the parent entity with high level job details and parts page in a separate tab. If I have parts datagrid2 in the 2nd tab, my action button + to create a new part is disabled and unable to create new parts. My only thought is to initiate a new part as a parameter but wanted to verify with members of the community.Thanks!
asked
1 answers
0

Hi Joe,


One thing you can do is

Remove DG2's built-in add button "+" entirely and then

Add a custom button → add a microflow on click of that in which

  • Creates a new Part object
  • Associates it to $WorkOrder via the association
  • Opens a popup page with the new Part as parameter


Then you can conitnure working on uncommitted parents because Mendix holds both objects in memory.


and after all your business logic you can commit Work Order object and all associated parts together.


This aligns with what you were already thinking,

answered