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
Joseph DindingerJoseph Dindinger 

Encrypted Fields Breaking in Chatter Action (Web vs SF1)

Hello!

Has anybody run into an issue with using encrypted fields in VF pages in a Chatter action?

We've found that we can read encryped fields just fine in our VF page, but as soon as we put it in the Chatter action, we lose the ability to decrypt it in the code.  Please take a look at the attached screenshots of a page we made just to prove the issue.  Notice how the Chatter action in the classic web shows the encrypted value, while everywhere else it works correctly.

In SF1
In Web
VF Page

Here is the code for this page, in case there might be something we are doing wrong:

VF PAGE CODE:
<apex:page controller="TestABC">
 <apex:outputText value="{!privateDestinationAuthToken }" /> 
</apex:page>
APEX CONTROLLER CODE:
 
global with sharing  class TestABC{
    public static uStudioApi api {
        private get;
        private set;
    }
    @TestVisible
    public static String privateDestinationAuthToken {
        get;
        private set;
    }
    static{
         api = uStudioApi.getAutoProvisionedInstance();
         privateDestinationAuthToken = api.getChatterAuthToken();
    }
}

Any help would be very appreciated!!!

Thanks,

Joseph
Best Answer chosen by Joseph Dindinger
Cliff ArmstrongCliff Armstrong
Hi Joseph,
Please review this help article and see if it addresses this issue: 

https://help.salesforce.com/apex/HTViewSolution?urlname=Encrypted-fields-are-being-masked-in-a-VF-page-when-embedded-into-a-standard-layout-1327109986153&language=en_US

All Answers

Cliff ArmstrongCliff Armstrong
Hi Joseph,
Please review this help article and see if it addresses this issue: 

https://help.salesforce.com/apex/HTViewSolution?urlname=Encrypted-fields-are-being-masked-in-a-VF-page-when-embedded-into-a-standard-layout-1327109986153&language=en_US
This was selected as the best answer
Joseph DindingerJoseph Dindinger
Thank you Cliff!  Yes, that is what we are going to have to do.