Free App Walkthrough 1: Sandbox Post-refresh Masking Scripts

    As a consultant I feel it's really important to know the handful of free apps which is available on the Appexchange.  I have started this 'Free App Walkthrough' serious to explain the configuration and usage of an app.

    In this post I am going to walkthrough 'Sandbox Post-refresh Masking Scripts'. With this app you can able to mask any fields with the below setting.
      1. Custom String
      2. Random Date
      3. Random Email
      4. Random Phone
      5. Random String

There are two way you can mask the data 
    1. On any type of sandbox, masking the existing data.
    2. Mask the data while creating/or refreshing the Sandbox.

List of important component which is created after installing this package
    1. Custom Metadata: Data Masking Configuration,  Post Copy Task
    2. Object: Automation Task Log
    3. Apex Class: SBX_BatchMaskSandboxData

 1. On any type of sandbox, masking the existing data:
        Let's create the configuration to mask the data in sandbox. You can mask both the standard and custom object fields. For example now I am going to mask the contact email field, to do that lets create the 'Data Masking Configuration' metadata record for contact and it's email. To do go to the 
        
        Setup --> Custom Metadata Type --> Click Manage Records on the Data Masking Configuration --> Click New. Enter the details as like below.

    

        Like this you can able to create data masking configuration for any objects and it's field. Once you created all the record you can run the below code on your developer console to mask the records.


        Once the job has completed you will receive the email and also the status will be stored in the 'Automation Task Log' object. 

Job status:




    Note: Key limitations include any validations on the fields may cause an issue with the scrambling.

2. Mask the data while creating/or refreshing the Sandbox:
            
      I will update this details next week.

Please let me know your thoughts and the data masking methods/tools which you are using.