Posted on May 18, 2020 Leave a Comment
Remote Process Invocation – Request and Reply Best solutions External Services – invokes a REST API call – allows to invoke externally hosted service in declarative manner. External REST service are available in a an OpenAPI or Integrant schema definition. Contains primitive data types, nested objects not supported. Transaction invoked from Lightning Flow. Integration transaction […]
Posted on May 13, 2020 Leave a Comment
Below details the different Salesforce events types for different use cases 1. Change Data Capture Select the entities that generate change event notifications. Change Data Capture sends notifications for created, updated, deleted, and undeleted records. All custom objects and a subset of standard objects are supported. /data/AccountChangeEvent – any changes to accounts Create account Update […]
Posted on May 12, 2020 Leave a Comment
What’s a Service/API A service/API is a function that is well-defined, self-contained, and does not depend on the context or state of other services. 1. Abstract vs Concrete When developing software we often use abstraction and polymorphism to get most of our applications. We want to reuse as much of the code as possible. Should […]
Posted on May 6, 2020 Leave a Comment
Coding question asked by Google Develop a Trigger on asset to count the amount of assets for a specific account. The value of the asset should increate on insert or undeleteand decrease on delete or reparent to a new account. Assumption: an asset cannot have a null AccountId, validation rule will fail and not save the record. […]
Posted on April 30, 2020 Leave a Comment
Here is a fun Apex challenge to test your Apex skills: SFDC99 Final Project Challenge! Optimizations: 1. Add static variables to custom variables/custom metadata 2. Cache mapOfZipOwner for faster retrieval + less SOQL queries Assumption: updating an account owner can only be when: 1. Zip code was empty (null) and now has a value 2. […]
Posted on April 29, 2020 Leave a Comment
Currently it is not possible to extend a standard or custom object in Salesforce. Why would you want to do that you may ask, think about the following, how would you check the age of a contact, if they have a mobilephone, sort list of objects, serialize, deserialize, . Define an Obj class that will […]
Posted on April 29, 2020 Leave a Comment
Given an encoded string, return its decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is guaranteed to be a positive integer. DecodeHelper class DecodeHelper Test
Posted on April 22, 2020 Leave a Comment
Coding question asked by Google Find the top most parent accountId by traversing the account hierarchy Recursive method Batch class Test class
Posted on September 12, 2019 Leave a Comment
Here it the use case: You have 1 job that you want to run weekly and monthly but the monthly job also has to generate a notification. You don’t need to create two classes but can pass a parameter to the schedule to know it is a weekly or monthly job. The batch Job class […]
Posted on August 5, 2019 Leave a Comment
Here is the problem that needed to be solved: 1. Use session cache to cache some user information like their profile or user settings 2. When a external systems update the information and try to remove the session cache as it got updated it fails because it does not have access to a users session […]