Adding custom logic during saving data

1
Hello,  I need to add custom logics to the save button click event. for example, call an external API. So I want to call an API after saving data into Mendix. How can I implement this? Thanks
asked
3 answers
1

Hi, 

You can use this action in a microflow on your save button 

https://docs.mendix.com/howto/integration/consume-a-rest-service#5-calling-the-rest-service-in-a-microflow

Hope this helps!

answered
1

Hi Shamim,

You need to create a microflow button and create a microflow to add you save and then API logic by using REST call. Please read  how to Create a Custom Save Button documentation for more details. I also recommend to go through learning paths (if you have not already done so).

 

Hope this helps!

answered
0

Hi,

Maybe yor question goes a bit deeper and is about a basic thing that is not yet covered by other answers? Aside from Garion Swann’s answer to your question it reads like you would like to configure your own microflow in a save action ?

 

you can change your existing save action into your custom microflow button or just create a new microflow button which handles your save. Typically the microflow has a a commit and a close page but you might also want to retrieve and commit associated data that changed or validate your form. And call your API ;)

check out https://gettingstarted.mendixcloud.com/link/module/95/lecture/785/8.4.1-Create-a-Validation-Microflow

 

answered