Deactivating a
Salesforce Sys-Admin

Goldie activity sync relies on scheduled Apex jobs as well as a properly configured Email Service handler in your Salesforce org . Both have a "context user" which is usually the sys admin that installed the Goldie managed package. It is vital for Goldie activity sync that this context user is not deactivated.

This is why if you try to deactivate the context user, a trigger on the user object will throw an exception, preventing this user from being deactivated. In order to resolve this you have to switch the "context user" of the email service and the scheduled Apex jobs.

Switching the Context User of the Email Service

Switching the Context User of the Scheduled Apex Jobs

AbSf.AbSfScanner.scheduleReplyAndCancelSyncScan();

AbSf.AbSfScanner.scheduleDailyScan(0);

After you have switched the context users you can now deactivate the previous context user as originally intended.