Virtusa Consulting Services
ICICI Bank Interview Questions and Answers
Q1. If more than 50K records are fetched by the SOQL in the trigger. how to handle that.
To handle more than 50K records fetched by SOQL in trigger, use batch apex or pagination.
Use batch apex to process records in smaller chunks
Implement pagination to limit the number of records fetched at a time
Consider using selective SOQL queries to reduce the number of records fetched
Avoid using SOQL queries inside loops
Use query optimizer tool to optimize SOQL queries
Q2. write trigger , there are 3 objects, a is parent, b child, c is grand child, when grand child updated update grand child desc on a object desc
Write a trigger to update the description field on the parent object when the grandchild object is updated.
Create a trigger on the grandchild object
Use a SOQL query to retrieve the parent object
Update the description field on the parent object with the grandchild's description
Q3. how manual sharing works and how to see manually shared rercords
Manual sharing allows users to manually grant access to records. To see manually shared records, use the 'Sharing' button on the record detail page.
Manual sharing is a feature in Salesforce that allows users to manually grant access to records.
It is useful when users need to share specific records with other users or groups.
To manually share a record, users can click on the 'Sharing' button on the record detail page.
From there, they can add individual users or groups and spec...read more
Q4. How to use current page's Id in LWC
To use current page Id in LWC, we can import '@salesforce/apex' and call Apex method to get the Id.
Import '@salesforce/apex' in LWC JS file
Create an Apex method to return current page Id
Call the Apex method in LWC JS file using '@wire'
Access the current page Id in LWC HTML file using '{pageId}'
Q5. How to improve test coverage of a class.
To improve test coverage of a class, write more test cases to cover all possible scenarios.
Identify uncovered lines of code using a code coverage tool
Write test cases for each uncovered line of code
Write test cases for boundary conditions and edge cases
Use mock objects to simulate dependencies
Refactor code to make it more testable
Q6. write trigger on opportunity to sum of total opps and populate on account sumofopps field
Write a trigger on Opportunity to calculate the sum of total opportunities and populate it on the Account's 'SumOfOpps' field.
Create a trigger on the Opportunity object
Use an aggregate query to calculate the sum of the 'Amount' field on all related Opportunities
Update the 'SumOfOpps' field on the related Account with the calculated sum
Q7. decorators in lwc
Decorators in LWC are a way to enhance the functionality of a component by adding metadata and modifying behavior.
Decorators are used to modify the behavior of properties, methods, and getters/setters in LWC.
They are defined using the @ symbol followed by the decorator name.
Some commonly used decorators in LWC are @api, @track, @wire, and @track.
The @api decorator allows a property to be accessed by parent components.
The @track decorator tracks changes to a property and trigg...read more
More about working at Virtusa Consulting Services
Interview Process at ICICI Bank
Top Salesforce Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month