Make Users’ Personal Data Unusable by Salesforce at Their Request
Where: This feature is available in Lightning Experience, Salesforce Classic, and in Enterprise, Performance, Unlimited, and Developer editions.
Why: For example, a departing sales rep or an external user leaving a community wants Salesforce to stop tracking their personal information. You invoke the System.UserManagement.obfuscateUser Apex method, which permanently scrambles the user’s data and replaces it with random character strings. The user’s detail page remains, but the fields contain meaningless strings of characters.
obfuscateUser() affects the standard fields of the user object, excluding a few fields, such as the user ID, time zone, locale, and profile.
How: To enable this feature, in Setup, go to User Management Settings, and select Scramble Specific Users’ Data.
Then invoke System.UserManagement.obfuscateUser through Apex triggers, processes, workflows, or the Developer Console. This method changes only the user object. The association between the user and other objects is removed, but no other objects are changed. For example, contact, ThirdPartyAccountLink (TPAL), and user password authentication (UPA) objects remain unchanged.
It is recommended that you note the user’s ID and other attributes for post processing, such as the email address, if you want to send the user a confirmation.
This feature is part of our effort to protect users’ personal data and privacy.