Posts

Showing posts from June, 2020

LinkedIn

Flows - Exception Logging using Fault Connectors & Platform Events - Implications

Image
Since count of flows are getting increased day by day, it is also becoming really important to handle and log exceptions from flows, so that we can track what went wrong during your current execution. Let us see how to handle exceptions in a flow using fault connector, and what will be the transaction behavior after adding a fault connector to the flow. Scenario: Update Account Country from Contact to Country field in Account - Flow on Contact Example : Account - Account ABC Contact 1 -> Country ->India Contact 2-> Country->United States On Contact 2 save Country Value on Account should be India, United states. Scenario 1 - Contact Save Success  Below is the flow which will be updating Account with child contact country values: For the Above, flow execution will be as follows: 1. User create a new Contact with Account as Account ABC and Country as India. 2. Flow is getting executed and Flow updates Account country as India in Account as sown below. Scenario 2 - Update Faile

Salesforce - How to Track Record Save Performance Details Using Log Inspector

Image
When your Salesforce instance is growing with lots of customization, there are high chances that you might hit performance issues with respect to Record save time. Salesforce is providing with out of the box approaches to track and find out time consumed by each of your operation. Let us see how we can track that - with the help of a sample scenario - Contact record save operation. Scenario - Customization On Contact Object Let us consider 2 Customization on Contact Object. 1. Assign Task to Account Owner - Process Builder When a new Contact is created, assign a task to Account Owner asking to reach out to that Contact to get some additional details about him. This can be achieved through a Process Builder as shown below: 2. Update Account Country from Contact to Country field in Account - Contact Trigger Example : Account - Account ABC Contact 1 -> Country ->India Contact 2-> Country->United States Once the contacts are saved, Account Country value should be -> India,