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
Kushagra AggarwalKushagra Aggarwal 

Redact specific variable assignment from apex code

Hello Community,

We recently created an apex class which API's into another system and uses the login credentials. Salesforce logs for API is exposing our password so I want to know if it is possible to redact a specific variable assignment from an Apex code?

Thank you so much for your time. 
David Zhu 🔥David Zhu 🔥
You may use one of the options below:
1. Named Credential
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm
2.Use Custom Setting or Custom Metadata type to save the credential configurations, then Apex code refers the settings.