How to find, where the $_REQUEST is coming from? Which Module

Hi!

In Suite the opportunities can be created through opportunity module create page as well as contact sub panels. I am creating a module to block the access of creating opportunities by overriding display and pre-display functions. I would like to know a way to find that from where this request is coming. From the opportunity module or contacts module(sub panel) ? SO I can process based on that result.

Thanks in Advance.

if you are trying to block out subpanel creation i would simply remove the create button for the subpanel.

https://www.suitecrm.com/forum/developer-help/8486-how-to-add-a-custom-top-button-to-any-subpanel

What exactly are you trying to do?

NO, I want to allow subpanel creation and want to block the creation of opportunities from Opportunities Main Page create button(left menu button)

I dont know off the top of my head but i’m sure there is a way to alter how the display happens to remove the button.

Thank you ! angrymob, I have found the way to differentiate the functions, By getting the return_module value. By based on the value I am blocking the access

Cheers!

Please share with us what you did.

Yeah. I will post that soon here

if($_REQUEST[‘return_module’]== “Contacts”){
//do whatever needed
}

if($_REQUEST[‘return_module’]== “Accounts”){
//do whatever needed
}

1 Like