AnsweredAssumed Answered

Sugar 7 : detect which button had been clicked

Question asked by Gaelle Fernandez on Jul 30, 2014
Hello everyone,

i have a biiig question :

In Accounts record view, i have two buttons : "Create Contact+" in rowaction and "Create Contact+" in Contact+ subpanel.

They both fire a Contact+ (which is a custom module made with ModuleBuilder) create form.

i would like to adapt the create form whether it was the rowaction's button or the subpanel button that had been clicked.

So, i have two questions :
 - Should i create two different views, each called by one button? If yes, how should i do that? (by still keeping the standard create actions)
- OR i could tell my Contact+ record.js to hide some fields depending of the button clicked. If it is a good solution, please tell me how i can detect wich button had been pressed on Account's view when i'm on Contact+ create form.

Could you please tell me how to do that?μ

Thanks a lot for the hand!
Gaëlle

Outcomes