Modifying the location when saving a record

I thought there was a quite simple solution, but I can’t remember correctly.

When saving a record (add/edit) I want to jump to a different location after the save action. I can modify the postAdd/EditAction, but I thought there was a quite simpler solution by passing some value. But I can’t remember. What’s the best practise here?

Thanks,
Michi

Your instinct is correct, you need to implement postAdd/EditRecordAction. Unfortunately no other magic on that.

https://docs.preside.org/devguides/datamanager/customization.html
https://docs.preside.org/devguides/datamanager/customization/postAddRecordAction.html
https://docs.preside.org/devguides/datamanager/customization/postEditRecordAction.html

^^ for future googlers :slight_smile:

additional question: Can I change the location when canceling a record? There isn’t something like an onCancel (which would be nice, by the way for logging stuff)

My problem is, that I’m coming from different location to an edit form and want to jump back to the right position.

I believe you should be able to set args.cancelAction in a preRenderEditRecordForm action @m.hnat