Blogs

  • Execution of Trigger and Workflow – A practical Analysis

    Target Record: A Case record with Status =”New” in Database. There is trigger which updates the value of Status =”Working” in before update event. There is workflow too which updates to Status to “Escalated”. So, we are going to analyze how system behaves in these scenarios: Lets play as below: P.S: In all events, old…

    Read more…

  • Apex Trigger Practice (4)

    Prerequisites Standard Contact Object There is checkbox Field on Contact called “Active” A custom object “Employment Detail” as child object of Contact Object There is a picklist field “Status” having two values: Employee, Ex-Employee And a lookup field to Conatct Requirement: If Contact field “Active” is marked as true, then If no record of child…

    Read more…

  • How to check whether a user (not current User) has active logged in session or not

    The AuthSession object keeps each non-guest user session in your organization. Here is full detail of object: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_authsession.htm Check the size of auth if it’s greater than zero and IsCurrent is true then session is active otherwise not.

    Read more…