+ Start a Discussion
Tim BarsottiTim Barsotti 

outputText is not displaying encrypted data?

 

I have a simple VisualForce component that is not displaying encrypted data properly. 

According to the docs: "Warning:Encrypted custom fields that are embedded in the component display in clear text. The component doesn't respect the View Encrypted Data permission for users. To prevent showing sensitive information to unauthorized users, use the tag instead." Reference: http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_outputText.htm

My VisualForce component is as follows and has been added to a standard page layout:    

<apex:page standardController="My_Custom_Object__c">
   <apex:outputText value="{!My_Custom_Object__c.My_Encrypted_Field__c}"/ >
</apex:page>

 

It is displaying information encrypted with or without the View Encrypted Data permission and I would like it to display unencrypted. Please advise. 

Thank you!

Alderete_SFDCAlderete_SFDC

Hmmm. I just tested it on here on a test org, and the encrypted data is displayed in plaintext, the documented behavior. The field displays as masked/encrypted when viewed on the standard layout for the object.

 

So, it sounds like you're having a problem that should be investigated. Open a case with Support, and let's see if they can diagnose the issue.

Tim BarsottiTim Barsotti

Thanks Alderete. I have tried this in a sandbox and developer org and both are yielding a masked value. I opened a PS case on it yesterday. I'll let you know what comes of it. 

asish1989asish1989

HI

If you want to display value in encrypted format then use  <apex:outputField> .

If you want to display value in plain text ot Unencrypted format then use <apex:outputText>.

 

If this post answers your questions please mark it as solved and give kudos if this helps you.

 

Thanks

Tim BarsottiTim Barsotti

Thanks for your suggestion Asish. Both are displaying them encyrpted.