Hi, I want to know the platform from where the logic hook is being triggered to execute different code for different platforms.
Is there any way to get the current user's platform from the logic hook?
Hi, I want to know the platform from where the logic hook is being triggered to execute different code for different platforms.
Is there any way to get the current user's platform from the logic hook?
Hi David,
The platform name can be acquired from $_SESSION['platform'] if there is a user session. In most cases where there is no session, it should be in $_GET instead. Though do be sure to handle unexpected situations for cases like scheduled items and future changes.
In the Sugar code you find:
$platform = empty($_SESSION['platform']) ? 'base' : $_SESSION['platform'];
Harald Kuske
Principal Solution Architect – Professional Services, EMEA
hkuske@sugarcrm.com
SugarCRM Deutschland GmbH