function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mohammed JunaidMohammed Junaid 

Text(encrypted)............... How to get the field value in controller..

Hi,

 

I am having an custom field of Type(encrypted).

 

When i am viewing the Text field in UI,it is displaying my ******.

 

I know we can achieve it by this

 

http://developer.force.com/cookbook/recipe/storing-and-displaying-confidential-information

 

But i want to access this field in controller or at Page level to display.

 

I dont wanna create a duplicate of this field in the custom Object.

 

Please if any one has come across this situation or Know the solution please reply.

 

Thanks for your Time and reply.

 

Regards,

Mohammed Junaid

mikefmikef

I tested in the system log and Apex can read the full value of this field unencrypted just fine. If you want to expose this field to a VF page just copy the field value to a controller variable and use outputText tag to display the value.

Mohammed JunaidMohammed Junaid

Thanks for the Quick Reponse.

 

I had fetch the value and i am assigning it to String variable and printing it .

 

It is displaying me Pure ****** values.

 

It is not encrypting it.

 

Requesting you to please give me code snippet.

 

I appreciate for your help.

 

Regards,

Mohammed Junaid

 

 

mikefmikef

make sure your controller doesn't have the 'with sharing' key words.