module_sugar_grp1 is not defined

Hi, I have custom funcionality in the Accounts module. I was using:

if (module_sugar_grp1 == 'Accounts' &&action_sugar_grp1 == 'EditView'){

which worked in SugarCRM 6.5, but in SuiteCRM gives me

module_sugar_grp1 is not defined

How can I get the current module in SuiteCRM?


You may want to make use of logic hooks.
You would be able to create one for Accounts, that only fires on the Edit View.

You can find how to set up a logic hook from the SugarCRM dev guide:
I also made a post detailing how to create a logic hook here:

Hopefully, this helps a little with your understanding of how SuiteCRM handles custom work.