I have total 6+ years of experience all in Salesforce. I have knowledge in Integration, Rest , soap Apis, admin, customization , JSON , SOQL query, Lwc, Flows, Trigger , synchronous and asynchronous apex , apex code , governor limit. Vlocity, Omnistudio
Sr. Software Engineer
Tech MahindraLead Consultant
INFO-TECHNOApex
Apex Data Loader
Java
BitBucket
Workbench
Azure Pipelines
Yeah. Hi. Hi. I am. So I have overall 6 plus years of experience in Salesforce industry. I am a Salesforce software developer. So, uh, currently, I'm working with. Uh, here, I recently joined here on Feb 2024. Uh, before this, uh, I was working with Tech Mahindra. There, I was a senior senior Salesforce developer. Uh, here in, I am as a I joined as a tech lead. Uh, the major work which I am performing here is, uh, on the Omni Studio packages. Uh, we have a a big client like Synchrony. So we are working for Synchrony, uh, client, and we are migrating the data from audio system to our Salesforce system. And, uh, we are, uh, performing this via Salesforce Omni Studio. Like, uh, we are creating Flexcard, Omni script, integration procedures. These are things we are creating, uh, here in the, uh, BillerSoft.
How do complex SQL query that is causing CPU time limit trigger. So, uh, for this, we can, uh, we create this, uh, SQL query by, uh, adding a limit, uh, key keyword in the last so that we, uh, we can specify how much time how much, uh, records we want to fetch through this, uh, circle query, and we will take, uh, one more thing, uh, via writing a trigger or a a SOQL query that we are avoiding to write a SOQL query inside of all loop. So, uh, instead of writing query inside of all loop, we can use, uh, for each loop of query, like, uh, account a colon, uh, data select ID from account where limit is. So that will work more efficiently. So, uh, it will reduce the this limit error. So as we know, there is a synchronously, uh, limit of SQL query. That will be 100 100 SQL query we can, uh, write in a synchrony way. So we can do, uh, these all things to avoid the limit error.
What is the process of debugging a failing used in our Apex class? So, uh, basically, uh, we'll check what is the error is coming in the, uh, logs. Then we'll, uh, try to debug that log via printing that SQL query. Either we are getting, uh, government limit 101 or, uh, there is a restriction of that particular field which we are trying to access, or there is a permission related issue in the software query. So those all things we need to rectify or, uh, we need to go to through the object on which data has written, and we'll check, like, what type of provision, uh, is given to that particular circle query if that is, uh, run-in the user mode. Basically, uh, uh, all the Apex code runs in the system mode, but we can modify this in a user mode as well. So we'll check those all things to, uh, to avoid these kind of failures in the Apex. Yeah.
Salesforce app. How do you recommend whether to use Salesforce standard controller or custom Apex controller? So, uh, basically, uh, it's better to use a handle class. Salesforce handle class, Apex handle class. So, uh, to avoid the complexity of the code. And, uh, if we're talking about the trigger, there is also trigger handle class as well. So it's better to use, uh, trigger handle class and write a logic in the hand handle class and call it from the main trigger. So it will do, um, uh, like, we can, uh, perform the code coverage of the that particular handle class separately. So it will help in the, uh, test writing a testing class and testing test class, and, uh, it will help to deploy those codes as well. So, uh, because as we all know, like, deployment is only only possible when we have a sufficient code coverage, which is 75%. Minimum 75% is required. So, uh, we'll make sure, like, uh, the code which we have written should be, uh, covered by 7, uh, the test class, uh, with minimum percentage of 75%. So, yeah, this is the fun. This is, uh, this must be 75% criteria. But here in, uh, we are, uh, covering up to 85%. Previously, in Tech Mahindra, they also consider as, like, 85 to 90%. So these are these are the things we are doing.
What testing strategy would you use for a complex sales for instance with multiple custom custom applications. So not sure you are talking about, uh, uh, like, Salesforce testing in, uh, like, uh, we have a testing scenario different different like, if we develop something, then we used to we used to test us our service with the test data which we have created in, uh, in the org. So not sure what you are talking about. If we have developed something, then we should know we must know, like, uh, what are what all the test data is required to run this particular service and what all scenarios we can test. Like, there are a couple of scenarios which we can configure, like, uh, positive and negative scenarios. We should, uh, for example, here in, what we are doing, there is a, um, there is a Salesforce org, which we are exposing to PASER. PASER is a third party. So PASER is trying to access the Salesforce API. So we are exposing our endpoint URL, and, uh, we are testing, uh, through, uh, Postman of of our endpoint URL that, uh, in that endpoint URL, we are customizing the body. In the body, we have multiple validation which we have written in the Apex Apex class like phone pay validation, the zip code validation. That zip code must be a number only. It should not greater than 5 digit or it should not accept any character or any, uh, other value than, uh, numbers. So these are validation we have entered. If we are trying to enter, uh, through postman like some other things instead of number, then it should fail. So it should error it should throw a message, which we have configured in the Apex class. So, uh, so we have tested multiple scenarios, and we are getting the proper response with what we are what we have developed. So, yeah, these kind of things we have tested. In the Apex class also, we have a test class for the particular Apex class. In the test class, we have to we used to follow some best practices, like, uh, we need to write maximum number of code. If if we if we are trying to make a, uh, HTTP mock test call out, then we need to write it in the test dot start block in and test dot end end block between this. So, uh, yeah. So these in this block, the governor limit, uh, will increase, um, will be doubled somehow. So other than that, uh, there should be a test set of method, and every method, uh, should be a test test method or, uh, is test annotation should be there in, uh, every method. So these are all things we should use.
How do you incorporate the solid principle of in designing the reusable Apex class for the Salesforce application. Yeah. It's better to use, um, like, existing, uh, classes which, uh, already written in the Apex. So, uh, I I also prefer this. Like, if we have, uh, any, uh, any rapper class, which is which is written, generic rapper class or generic mock test class or generic, uh, class, uh, to get the endpoint URL or to get the response body or to get the, uh, to modify the response. So, uh, this is the best best practice to use those only, um, via via creating the instance of that particular class and, uh, that method. So, uh, it it will increase the reusability of the code, and it will not, uh, you know, take much space. So while we're deploying that, uh, the code, just refer that particular test class, and it will, uh, easy to deploy. So, yeah, it's better to use the existing Apex class instead of creating a new one. So, uh, yeah.
Excellent. Identify why developer might be encountering the owner limit when querying large dataset and suggest an optimal optimization to prevent, uh, hitting this limit. List of account, ID name, select ID name from contacts, from account. Account a uh, complex logic manipulating both account and contact. So here, I can, uh, as we can see, like, there is a generic query written on account and contact. So it might possible, like, uh, in the database, uh, we have more than 50,000 of or 1 lakh account. So, uh, it will definitely hit this query. So, uh, it's better to, uh, write this query inside that 4 h loop for account a colon. Instead of accounts, just write this select ID name, uh, select ID name, select ID name from context from accounts. So this full query you can write instead of accounts. So what it will do, it will take 2 100, 200 chunks of accounts, and it will, uh, not cover much heap size like a heap. So it will automatically remove from the heap, so it will not encounter any heap size issue. Yeah.
Code snippet that is meant to update a contract, contact recall, and then comes custom field, custom status changes to determine why the stinger might, uh, might not have. So this is some trigger after a bit. So list of contacts. If account account custom field. So update the content report when the account doesn't feel changes to I need to check. Not a code to trigger dot org.8. This is a dot ID dot custom field setting status. So Here. Here. Yeah. Here. Uh, this for contact ccolonacc.context. Here, we can we can't directly, uh, context subject. We can't directly, uh, uh, write a for this loop on a c z dot contacts. We need to write it in a separate, uh, line, like, SOCO query we need to configure. We need to track all the context related to that particular account. So in this particular, uh, code, we need to fetch first ID of that particular account, which is going to which on which this custom status is changing. Then from that ID, based on that based on that particular ID, we need to fetch all the contacts, and then only we need to, uh, update the record. So this must be the answer. So, uh, we need to we need to write the separate query for the contact based on the ID where, uh, ID in colon, uh, we need to fetch first set of, uh, IDs. ACC dot ID, we need to fetch all the IDs in the sets. Then, uh, from that sets, we need to capture all the context, related context, and we need to update that those contacts.
Class. So, uh, here, we have multiple things. So to enforce, like, uh, sharing rules in the Apex class, uh, via using with sharing or without sharing, uh, in at the class level. Other than that, we have very, uh, encryption as well. With security enforced is a keyword, which we need to append in the last of the circle query. Though so, uh, it will, uh, check, uh, the logged in user who is performing this particular task or this is, uh, who is executing this Apex class have, uh, all the fields access which on which, uh, that's a software query is written. So, uh, it will check all the permissions of the particular user, then only it will execute. If, uh, if a user doesn't have any, uh, like, permission of that particular field, which which are already mentioned in the SQL query, then it will throw another. So, yeah, basically, with security and force to the keyword.
So query to generate report that provide insights to into property sale trend. Uh, that provide insights to property sales trends. Uh, not sure. Uh, generate report. We can we can write a query or we can use Salesforce inspector. There, we can write a query of whatever the data we we, uh, actually required. Then there is a, uh, there are some buttons near there, uh, below that. You can convert those files into Excel format or CSV format. We can directly copy those files, and we can directly migrate to the Excel format. From there, we can, uh, either we can, uh, create this report or not. Uh, so if this is the question, then I think this this way we can do. Other than that, how would you use software to generate reports? Uh, so this is coming in my mind right now. So yeah.
Sales was triggered to handle bulk operations in property management workflow. So, uh, this is the, uh, as the question suggests, how how, uh, how we can optimize Salesforce trigger to enter bulk operation. So trigger must be bulkified as well. It is a best practice to, uh, do to write a trigger. So, uh, to bulkify it, uh, we need we do not, uh, need to hard code any value or we not we are not working for a particular record, which which are going to insert it. We need to think, like, if there is multiple records or multiple records, multiple records are going inserted or updated simultaneously, then, uh, the this, uh, piece of code should work. So, uh, while writing a trigger, like, uh, for a contact c colon trigger dot new, then it will take all the contacts which are going to update it, deleted, or undeleted, or inserted. So it will take all the context, then we have we need to perform all the activities which we need to do. Either we need to perform that with you on the parent, uh, object, like account, uh, or if we have to perform any exist, uh, on the contact itself, then we need to do it in the before context. Or if we are performing in for to the pay parent, then we need to perform in the after context. So, yeah, these are things we need to keep in mind. So, uh, bulkify yeah. I told you, like, uh, we need to work, uh, then, uh, if we are fetching all the queries, then we're there should also, uh, we need to filter it out where ID colon in this particular list or set of IDs so that it will capture all the IDs which are going to be inserted or, uh, it will take multiple IDs. And we can work on that particular IDs in a single. Yeah. Thank you. Thank you very much. So I think I have finished all the things. Yeah.