2

I having one question.

I am saving an object field as an encrypted field in the database. But I want while getting the value of that particular encrypted field, it should decrypted and give me the decrypted value.

For example: I have a field say Account Number = ‘12345678’ and it will be encrypted and will be saved in the database.

But when I am writing SELECT statement, then it should not give me the human unreadable format, it should be decrypted and give me the real value.

is it possible in SFDC environment?

1
  • Based on your conditions, WHY do you want it to be ecrypted in the database ? Knowing that, will help us help you. (please clarify questions by editing/updating them, rather than doing so in comments). – Samuel De Rycke Jan 3 '14 at 12:40
5

To read the encrypted field data the profile of the user in whose context the SOQL is invoked/ executed should have the the 'View Encrypted Data' permission checked otherwise the user will be unable to read the encrypted data.

You can go to the the profile and under the General User Permission, check the View Encrypted Data permission.

If you want only some users of the same profile to see the data then you can also create a permission set, check the View Encrypted Data permission and then associate this permission set with those users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.