Prevent before_save and after_save logic hooks from running on Import

I've got some rather expensive process that I don't want to run when importing lots of records. I've considered adding a field 'disable_hooks_c' or something similar to manually disable or ignore events that are triggered due to an import. However, it seems like there should be a way to detect when an entry is being created via the Imports module. 

Is there a native (non-hack) way of accomplishing this?

This is on a Sugar 7.7.1 instance

  • Hello Phil Zaengle

    for ex.

    function($bean, $event, $arguments)

    {

       print_r( $arguments); // here you will find related module information where you need to put condition like module != import. Sometimes you will not get $_REQUEST in SugarCRM 7 version in logic hook.

    }