Edit the actions of a default New button

0
Hi all, Please, can someone share with me how I can edit the action(s) of a default "New" button so that it can perform its reverse action(s)? Thank you
asked
5 answers
1

Hi Gbenga,

  If you want to do something other than create a new object, put an 'Action' button on the page.  Then tie this action button to a microflow.  This microflow can rollback your changes, delete the object, or something else.  For more information on using microflows and a wide range of Mendix learning, check out the free training videos here:

https://gettingstarted.mendixcloud.com/

Specifically, this training on microflows:

https://gettingstarted.mendixcloud.com/link/module/8/lecture/116

 

 

answered
0

Gbenga,

If you are adding buttons to the control bar of a datagrid or template grid, you can add a Delete button, if that's what you're looking for.  If you are outside of a data control and have a Create button, there is not a standard Delete button.  For that, you would use a Call Microflow button and use a microflow to perform whatever actions you want. 

Does this answer your question?  If not, perhaps you can share a bit more about what you want to do.

Thanks,

Mike  

answered
0

Thank you all for your answers and suggestions.

I might not have asked my question correctly. 

What I am trying to accomplish is have an action button that calls a microflow. The microsflow will retrieve the number of items in stock, reduce that number by the number of items being requested and update the record with the balance.

I am struggling with how to create this microflow.

Thank you very much.

answered
0

With the default 'New' button you cannot do this. But like they said above you can make an action button that calls a microflow retrieves your stock and then subtracts it based on the request.

Can you go into further details if you need help?
What's your domain model and the microflow look like?

answered
0

Thank you Wade.

This is a simple inventory app and I want the microflow for the sales aspect where it retrieves the stock and so on.

Here is my domain model

answered