Suppressing Events in events.js

How does one Suppress Events in the events.js file in the backend. I am using the wixCrm_onContactUpdated event handler which handles some code when a contact is updated in the Dashboard. However there is another place in my website where I am updating a contacts info and I want to prevent this “Event” from being fired. Currently I am getting this infinite loop taking place.

In know there is a suppressHooks field in the options object that can be passed into various updates, but these do not suppress the events. Is there a way to stop the above event from firing under certain circumstances?

Thanks
Andrew

I don’t think you can.
But maybe try to when you add to the extendedFields of the updateContact function some data about whether or not you should run the automatic code, and then on the backend event add a condition to run the code only if the info is true.

P.S. I’ve never tried it.

that’s a great idea, thanks. Will try that now.