“This session is not valid for use with the REST API” while making query

It’s because of fact that you don’t have permission to access org using API. If you are using developer console: Quick way to fix it to give permission “Use any API client” using profile or permission set. NOTE: If you do not find “Use any API client” then try to enable the permission “API Enabled”. …

“This session is not valid for use with the REST API” while making query Read More »

How to get IP Address of Community User – Guest and Logged in Customer User

DESCRIPTION Tracing IP address of community is utmost requirement to achieve different goals like geo based technical support, spam protection and other security things. There are bunch of forum discussions related to this: https://developer.salesforce.com/forums/?id=9062I000000g56rQAA https://salesforce.stackexchange.com/questions/145145/how-to-get-ip-address-of-current-user-in-lightning-component https://salesforce.stackexchange.com/questions/246085/how-to-get-the-public-ip-address-of-current-user-in-lightning-component-hosted-o/246087 APPROACHES In order to solve this, simple approach is to get the IP address and store in any custom …

How to get IP Address of Community User – Guest and Logged in Customer User Read More »

Salesforce Platform Encryption and Classical Encryption – Depuzzling

To take your security measures further, Salesforce Shield provides a more robust suite of solutions. Shield includes three products: Platform Encryption, Event Monitoring, and Field Audit Trail. Here our focus on Shield Platform Encryption, which provides a higher-level encryption (256-bit instead of 128-bit) than the classic offering. Platform Encryption is very different than classical encryption …

Salesforce Platform Encryption and Classical Encryption – Depuzzling Read More »

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 …

Execution of Trigger and Workflow – A practical Analysis 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 = …

PD2 Tough Questions – Refresh your amygdala Read More »