Blogs

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

  • PD2 Tough Questions – Refresh your amygdala

    Integer x = 1; Integer Y = 0; While(x < 10){Y++;} Will go in infinite loop because x is not being updated inside loop to break the condition. Integer x = 1; Integer Y = 0;While(x < 10){Y++;} ______________________ Contact con = new Contact( LastName = ‘JOHNSON’, email = ‘Web@test.com’);Savepoint sp = Database.setSavepoint();insert con;Database.rollback(sp);system.debug(con);con.email =…

    Read more…