Can I add a custom action to the create button?
When the user clicks create record, I want it to call a method to generate an invoice. Or will I have to make another button for the action.
Solution:Jump to solution
I think a job or model observer would be better than adjusting the default create action.
4 Replies
Solution
I think a job or model observer would be better than adjusting the default create action.
What would you recommend?
One’s just as good as the other. The main difference is the job can be queued so it won’t hold up the process.
This is relevant if the invoice creation could take some time to complete or if it also needs to be emailed to the user. Don’t want that holding up the page reload.
An observer that queues an job 😉