I am not very old player in Salesforce Integration but I have basic knowledge of Salesforce Integration. For my learning I have created some methods which gets session information from other salesforce org. For each callout (GET, POST...) I call this method first and then I use the session Information returned.

In one of my previous project, our architect created one integration framework where he was using platform cache to store session information. Is Platform cache is the best way to store session information ?

In some discussion forum, I have seen that not everyone recommend Platform cache to store session information, some suggest to use custom Setting or metadata as well but I don't know exactly how to use them.

Can anyone help me in this direction ? Any code snippet or information link in this direction would be much helpful.

Regards, Saurabh


1 Answer 1


For the Salesforce to Salesforce integration you describe, the best approach is to use Named Credentials.

For an example see: https://www.jitendrazaa.com/blog/salesforce/salesforce-to-salesforce-integration-using-named-credentials-in-just-5-lines-of-code/

Named credentials is more secure and maintainable than platform cache or custom settings/metadata.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .