how can i Mask sensitive data in sandbox
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
I want to mask the account name of the account object. So that the user cannot view the Account name. How can i do this. please provide me some suggestion
encryption
New contributor
Swathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
I want to mask the account name of the account object. So that the user cannot view the Account name. How can i do this. please provide me some suggestion
encryption
New contributor
Swathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Given that the account name is a mandatory field and is displayed by default on lookups this would be hard to do. What is the reason behind this as data visibility can be dealt with using Sharing and Roles?
– Dave Humm
1 hour ago
If this relates to making data in a sandbox different from Production, e.g. in a Full sandbox this can best be achieved with either a script run from the Developer Console or extracting the data scrambling any sensitive fields and reloading with Data Loader.
– Dave Humm
1 hour ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to mask the account name of the account object. So that the user cannot view the Account name. How can i do this. please provide me some suggestion
encryption
New contributor
Swathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I want to mask the account name of the account object. So that the user cannot view the Account name. How can i do this. please provide me some suggestion
encryption
encryption
New contributor
Swathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Swathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Swathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 1 hour ago
Swathi
61
61
New contributor
Swathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Swathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Swathi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Given that the account name is a mandatory field and is displayed by default on lookups this would be hard to do. What is the reason behind this as data visibility can be dealt with using Sharing and Roles?
– Dave Humm
1 hour ago
If this relates to making data in a sandbox different from Production, e.g. in a Full sandbox this can best be achieved with either a script run from the Developer Console or extracting the data scrambling any sensitive fields and reloading with Data Loader.
– Dave Humm
1 hour ago
add a comment |Â
Given that the account name is a mandatory field and is displayed by default on lookups this would be hard to do. What is the reason behind this as data visibility can be dealt with using Sharing and Roles?
– Dave Humm
1 hour ago
If this relates to making data in a sandbox different from Production, e.g. in a Full sandbox this can best be achieved with either a script run from the Developer Console or extracting the data scrambling any sensitive fields and reloading with Data Loader.
– Dave Humm
1 hour ago
Given that the account name is a mandatory field and is displayed by default on lookups this would be hard to do. What is the reason behind this as data visibility can be dealt with using Sharing and Roles?
– Dave Humm
1 hour ago
Given that the account name is a mandatory field and is displayed by default on lookups this would be hard to do. What is the reason behind this as data visibility can be dealt with using Sharing and Roles?
– Dave Humm
1 hour ago
If this relates to making data in a sandbox different from Production, e.g. in a Full sandbox this can best be achieved with either a script run from the Developer Console or extracting the data scrambling any sensitive fields and reloading with Data Loader.
– Dave Humm
1 hour ago
If this relates to making data in a sandbox different from Production, e.g. in a Full sandbox this can best be achieved with either a script run from the Developer Console or extracting the data scrambling any sensitive fields and reloading with Data Loader.
– Dave Humm
1 hour ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
You can use SandboxPostCopy interface that allows you run an Apex class as soon as sandbox is refreshed. Use that class to run a batch class that makes your data encrypted.
I have implemented similar for my project you can refer that
public class SanboxRefreshAnononimyser implements Database.Batchable<sObject>,SandboxPostCopy
public void runApexClass(SandboxContext context)
Database.executeBatch(new SanboxRefreshAnononimyser());
public Database.QueryLocator start(Database.BatchableContext BC)
String query='Select id,Name,PersonMobilePhone,PersonMobilePhone from Account';
return Database.getQueryLocator(query);
public void execute(Database.BatchableContext BC, List<Account> scope)
for(Account acc:scope)
acc.PersonEmail=acc.PersonEmail+'Dummy';
acc.PersonMobilePhone=acc.PersonMobilePhone+'Dummy';
acc.Phone=acc.Phone+'78';
acc.Name = SanboxRefreshAnononimyser.encryptText(acc.Name);
update scope;
public void finish(Database.BatchableContext BC)
private static String encryptText(String inputText)
String clearText = 'the quick brown fox jumps over the lazy dog';
Blob key = Blob.valueOf('123456789012345678901234');
Blob cipherText = Crypto.encryptWithManagedIV('AES192', key, Blob.valueOf(inputText));
String encodedCipherText = EncodingUtil.base64Encode(cipherText);
return encodedCipherText
Src: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_System_SandboxPostCopy.htm
That being said, if you have already refresh the sandbox, you can directly run this batch class in Apex to get it through.
Database.executeBatch(new SanboxRefreshAnononimyser());
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
You can use SandboxPostCopy interface that allows you run an Apex class as soon as sandbox is refreshed. Use that class to run a batch class that makes your data encrypted.
I have implemented similar for my project you can refer that
public class SanboxRefreshAnononimyser implements Database.Batchable<sObject>,SandboxPostCopy
public void runApexClass(SandboxContext context)
Database.executeBatch(new SanboxRefreshAnononimyser());
public Database.QueryLocator start(Database.BatchableContext BC)
String query='Select id,Name,PersonMobilePhone,PersonMobilePhone from Account';
return Database.getQueryLocator(query);
public void execute(Database.BatchableContext BC, List<Account> scope)
for(Account acc:scope)
acc.PersonEmail=acc.PersonEmail+'Dummy';
acc.PersonMobilePhone=acc.PersonMobilePhone+'Dummy';
acc.Phone=acc.Phone+'78';
acc.Name = SanboxRefreshAnononimyser.encryptText(acc.Name);
update scope;
public void finish(Database.BatchableContext BC)
private static String encryptText(String inputText)
String clearText = 'the quick brown fox jumps over the lazy dog';
Blob key = Blob.valueOf('123456789012345678901234');
Blob cipherText = Crypto.encryptWithManagedIV('AES192', key, Blob.valueOf(inputText));
String encodedCipherText = EncodingUtil.base64Encode(cipherText);
return encodedCipherText
Src: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_System_SandboxPostCopy.htm
That being said, if you have already refresh the sandbox, you can directly run this batch class in Apex to get it through.
Database.executeBatch(new SanboxRefreshAnononimyser());
add a comment |Â
up vote
2
down vote
You can use SandboxPostCopy interface that allows you run an Apex class as soon as sandbox is refreshed. Use that class to run a batch class that makes your data encrypted.
I have implemented similar for my project you can refer that
public class SanboxRefreshAnononimyser implements Database.Batchable<sObject>,SandboxPostCopy
public void runApexClass(SandboxContext context)
Database.executeBatch(new SanboxRefreshAnononimyser());
public Database.QueryLocator start(Database.BatchableContext BC)
String query='Select id,Name,PersonMobilePhone,PersonMobilePhone from Account';
return Database.getQueryLocator(query);
public void execute(Database.BatchableContext BC, List<Account> scope)
for(Account acc:scope)
acc.PersonEmail=acc.PersonEmail+'Dummy';
acc.PersonMobilePhone=acc.PersonMobilePhone+'Dummy';
acc.Phone=acc.Phone+'78';
acc.Name = SanboxRefreshAnononimyser.encryptText(acc.Name);
update scope;
public void finish(Database.BatchableContext BC)
private static String encryptText(String inputText)
String clearText = 'the quick brown fox jumps over the lazy dog';
Blob key = Blob.valueOf('123456789012345678901234');
Blob cipherText = Crypto.encryptWithManagedIV('AES192', key, Blob.valueOf(inputText));
String encodedCipherText = EncodingUtil.base64Encode(cipherText);
return encodedCipherText
Src: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_System_SandboxPostCopy.htm
That being said, if you have already refresh the sandbox, you can directly run this batch class in Apex to get it through.
Database.executeBatch(new SanboxRefreshAnononimyser());
add a comment |Â
up vote
2
down vote
up vote
2
down vote
You can use SandboxPostCopy interface that allows you run an Apex class as soon as sandbox is refreshed. Use that class to run a batch class that makes your data encrypted.
I have implemented similar for my project you can refer that
public class SanboxRefreshAnononimyser implements Database.Batchable<sObject>,SandboxPostCopy
public void runApexClass(SandboxContext context)
Database.executeBatch(new SanboxRefreshAnononimyser());
public Database.QueryLocator start(Database.BatchableContext BC)
String query='Select id,Name,PersonMobilePhone,PersonMobilePhone from Account';
return Database.getQueryLocator(query);
public void execute(Database.BatchableContext BC, List<Account> scope)
for(Account acc:scope)
acc.PersonEmail=acc.PersonEmail+'Dummy';
acc.PersonMobilePhone=acc.PersonMobilePhone+'Dummy';
acc.Phone=acc.Phone+'78';
acc.Name = SanboxRefreshAnononimyser.encryptText(acc.Name);
update scope;
public void finish(Database.BatchableContext BC)
private static String encryptText(String inputText)
String clearText = 'the quick brown fox jumps over the lazy dog';
Blob key = Blob.valueOf('123456789012345678901234');
Blob cipherText = Crypto.encryptWithManagedIV('AES192', key, Blob.valueOf(inputText));
String encodedCipherText = EncodingUtil.base64Encode(cipherText);
return encodedCipherText
Src: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_System_SandboxPostCopy.htm
That being said, if you have already refresh the sandbox, you can directly run this batch class in Apex to get it through.
Database.executeBatch(new SanboxRefreshAnononimyser());
You can use SandboxPostCopy interface that allows you run an Apex class as soon as sandbox is refreshed. Use that class to run a batch class that makes your data encrypted.
I have implemented similar for my project you can refer that
public class SanboxRefreshAnononimyser implements Database.Batchable<sObject>,SandboxPostCopy
public void runApexClass(SandboxContext context)
Database.executeBatch(new SanboxRefreshAnononimyser());
public Database.QueryLocator start(Database.BatchableContext BC)
String query='Select id,Name,PersonMobilePhone,PersonMobilePhone from Account';
return Database.getQueryLocator(query);
public void execute(Database.BatchableContext BC, List<Account> scope)
for(Account acc:scope)
acc.PersonEmail=acc.PersonEmail+'Dummy';
acc.PersonMobilePhone=acc.PersonMobilePhone+'Dummy';
acc.Phone=acc.Phone+'78';
acc.Name = SanboxRefreshAnononimyser.encryptText(acc.Name);
update scope;
public void finish(Database.BatchableContext BC)
private static String encryptText(String inputText)
String clearText = 'the quick brown fox jumps over the lazy dog';
Blob key = Blob.valueOf('123456789012345678901234');
Blob cipherText = Crypto.encryptWithManagedIV('AES192', key, Blob.valueOf(inputText));
String encodedCipherText = EncodingUtil.base64Encode(cipherText);
return encodedCipherText
Src: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_System_SandboxPostCopy.htm
That being said, if you have already refresh the sandbox, you can directly run this batch class in Apex to get it through.
Database.executeBatch(new SanboxRefreshAnononimyser());
answered 23 mins ago


Pranay Jaiswal
9,36431949
9,36431949
add a comment |Â
add a comment |Â
Swathi is a new contributor. Be nice, and check out our Code of Conduct.
Swathi is a new contributor. Be nice, and check out our Code of Conduct.
Swathi is a new contributor. Be nice, and check out our Code of Conduct.
Swathi is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f236849%2fhow-can-i-mask-sensitive-data-in-sandbox%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Given that the account name is a mandatory field and is displayed by default on lookups this would be hard to do. What is the reason behind this as data visibility can be dealt with using Sharing and Roles?
– Dave Humm
1 hour ago
If this relates to making data in a sandbox different from Production, e.g. in a Full sandbox this can best be achieved with either a script run from the Developer Console or extracting the data scrambling any sensitive fields and reloading with Data Loader.
– Dave Humm
1 hour ago