Send additional information to the logic hook

I was familiar with Sugar 6.5. Now I'm learning how to work with recent versions but is hard to change the mindset.

I'm working in a custom module. I've created a custom button to duplicate a record and create a new version of the record.
I've extend record view and I'm able to create the duplicate record using the drawer.open layout:create

I need to send some extra information for the logic hook before_save so I can diferenciate from a create record and a new version create record.

How can I send additional information to the logic hook?
For example send a control variable like subaction=newVersion

Is it possible for someone to direct me towards a path?

Parents
  • Maybe it is better to forget the before_save logic hook and create a custom endpoint called "customModule/?/newVersion". This way I know I'm in the new version method and I can call for some validation and create another record related to the first one.


    Is this achievable?

Reply
  • Maybe it is better to forget the before_save logic hook and create a custom endpoint called "customModule/?/newVersion". This way I know I'm in the new version method and I can call for some validation and create another record related to the first one.


    Is this achievable?

Children
No Data