Posts

Showing posts from December, 2023

Nebula Logger for Salesforce

Nebula Logger for Salesforce is a logging and monitoring solution specifically designed for Salesforce applications. It provides developers and administrators with enhanced visibility into the behavior, performance, and usage of Salesforce components and processes.  Nebula Logger is built natively on Salesforce, using Apex, lightning components, and various types of objects. There are no required external dependencies Unleash the Power of Advanced Logging with Nebula Logger | Dreamforce 2023 Why Nebula Logger Unleash the power of Advanced Logging Nebula Logger is an open-source framework developed by Jonathan Gillespie. It allows for considerably more robust debugging & error logging. It offers a neat solution to gather all the scattered data into one organised space. Helps link batch job logs together, aura and LWC logs together, and retain your debug logs for longer. Out-of-the-Box Salesforce Debugger Limitations Only Apex can directly add debug statements - in Flow and ...

Find Case ThreadId using Apex and Formulas

Ensure that an email sent to your customer support email is attached to an existing case using Thread ID. Formula - "ref:_" & LEFT($Organization.Id,5) & RIGHT($Organization.Id,5) & "._" & LEFT(Id,5) & SUBSTITUTE(Left(RIGHT(Id,10), 5), "0", "") & RIGHT(Id,5) & ":ref" Apex -  ref:_'+ UserInfo.getOrganizationId().left(5) + UserInfo.getOrganizationId().mid(11,4) + '._'+ caseId.left(5)+ caseId.mid(10,5) + ':ref ]'; The actual extraction of the thread ID is looking for anything in between "ref:" and ":ref" Example of a thread id: ref:_00D30oKPx._50030bwIii:ref Note: If multiple thread IDs are included in the header or the body of the email sent, the email will attach to the Case that is represented by the first thread ID in the string: Example  [ ref:_00D30oKPx._50030bwIii:ref ] [ ref:_00D30oKPx._50030bMuaN:ref ]  the email will attach to the case represented by ref:_00D30oKP...