+ Start a Discussion
Binu 8Binu 8 

show encrypted values

Hi Team,

    I have a custom object and it have a encrypted field.
    When I am trying to fetch all records in a visual force page the values like XXXXXXX.
    How can I decode it in apex class?
    
    I have one more doubt.
    
    If I enter a value from custom  visual force page how can I encrypt? And How can I decrypt in apex/controller class?
Best Answer chosen by Binu 8
Ashish_Sharma_DEVSFDCAshish_Sharma_DEVSFDC
Hi Binu,

There can be 2 ways.

1. Set "View Encrypted Data" permission for user.

2. Use Crypto classs as used in below post.
http://salesforceworld4u.blogspot.ae/2014/01/encryption-and-decryption-in-salesforce.html

Let me know if it helps you.