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

Calling Encrypted Field with API

I have an external application that needs to write to and retreive data from an encrypted text field in salesforce. Currently, it appears that i'm able to do both these things without doing anything special (like decrypting the values), that doesn't seem correct to me. Is this right? Is there something unique I need to do when working with encrypted fields via the API?



There's a profile flag that controls if you see the actual value, or just the masked version. encryption/decryption is handled for you.


I have the profile flag set on the my profile and I can see the value. It isn't set for the API user. I'm using an API user and Ruby on Rails with the databasecom gem to call the field. In this scenario your saying the encryption/decryption is done for me?


I think you will have to enable it for the profile Automation User for it to work.


try that and see if it works.


nb, this is from memory, but I believe that workflows/api calls use the Automation User profile for data permission purposes.