Blogs

  • “NO_MASS_MAIL_PERMISSION” Error While Sending Email From Apex

    If you are getting this error message while sending email using “Messaging.SingleEmailMessage” System.EmailException: SendEmail failed. First exception on row 0; first error: NO_MASS_MAIL_PERMISSION, Single email is not enabled for your organization or profile. Single email must be enabled for you to use this feature.: [] Step to resolution Make sure Email Deliverability is turned on.…

    Read more…

  • 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:

    Read more…

  • 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

    Read more…