+ Start a Discussion
Gourav JainGourav Jain 

Encrypted Fields

please tell me about Encrypted Fields in brief? thanks in advanced.?




Encrypted Custom Fields are a new field type (released after winter 08) that allows users to store sensitive data in encrypted form and apply a mask when the data is displayed (e.g., Credit Card Number: XXX-XXX-XX-1234).
Some important points :

User profiles who have the “View Encrypted Data” configuration enabled will be able to view the field normally.
Users who do not have the “View Encrypted Data” profile will see the mask.
User profiles that have the “Modify All Data” permission will not be able to see the value of encrypted data fields.
The field length is restricted to 175 characters in size.
Encrypted Field cannot be type cast as Unique or External ID.
An encrypted field cannot be configured with a default value.
You can’t use encrypted fields in report filters and list views.
You can’t use the encrypted fields in SOQL “where/order” clauses.
Also we can not use encrypted field formula fields, workflow rules, workflow field updates, approval process entry criteria, and approval step criteria.
If you clone a record that has encrypted custom fields, Salesforce will copy the data from the field ONLY if the user has the “view encrypted data” permission.
You can access the data of encrypted field in apex, i.e value is always unmasked.


Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 




I have a doubt on encrypted filed

can we change the standard format of filed 

for example : Credit Card Number: XXX-XXXX-XXXX-1234 but i need to display like 1234-XXXX-XXXX-1234

Can we achieve it

You can find all the answer here 

If you are satisfied with my answer, please mark it as a solution. Thanks in anticipation.
Tyler SwinyardTyler Swinyard
Very great info. Thank you!
Ankit Gupta SFDCLearnerAnkit Gupta SFDCLearner

Thanks Pradeep_Navatar (Sir) for great information, except of that, for viewing the value.

Create the custom profile.
Click Setup | Manage Users | Profiles.
Click New.
Select an existing profile to copy.
Name the new custom profile.
Click Save.
Click Edit.
In the General User Permissions section, select the View Encrypted Data checkbox. This allows users with this profile to see the complete value of encrypted fields instead of the masking characters.
Click Save.
Assign the new custom profile to the users allowed to view the encrypted data.