Blogs
-
Determine if the Salesforce instance is production org or a Sandbox org in code?
Most efficient way of identifying the type of org (Production or Sandbox) via Apex code: Actually we can query this detail from Organization object as below: On the top of this, we can build our own service method like below:
-
Convert String into Blob and Blob into String using Apex in Salesforce
Apex Code Snippet to Convert Blob into String Apex Code Snippet to Convert String into Blob
-
“The REST API is not enabled for this Organization” while using Salesforce REST Api
Check on the profile for the user. Access the profile settings in order to verify that API is enabled as well. In LEX, go to Set up | Users | Profiles. In Classic, click Setup | Administration Setup | Manage Users | Profiles. Select the profile that you need to check, and under “Administrative Permissions” verify if API Enabled is selected.