Add office photos
Engaged Employer

Capgemini

3.8
based on 38.9k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

10+ V Trust Eye Hospital Interview Questions and Answers

Updated 4 Jun 2024
Popular Designations

Q1. Write a trigger on Order Products. It should display the most number of sold product type on the account. Eg: if most order products sold out of Tv, Ac and Fridge is Tv then update Tv as the most_sold_product o...

read more
Ans.

Create a trigger on Order Products to display the most sold product type on the account

  • Create a trigger on Order Products object in Salesforce

  • Use SOQL query to count the number of each product type sold

  • Update the most_sold_product field on the Account object with the highest sold product type

Add your answer

Q2. Write a trigger on Account. if one or more contact is associated with Account then show error if user tries to delete the account

Ans.

Create a trigger on Account to prevent deletion if associated with one or more contacts

  • Create an after delete trigger on Account object

  • Query for related contacts using SOQL

  • If contacts are found, add an error message to prevent deletion

Add your answer

Q3. What are best practices in Trigger? And what are trigger events?

Ans.

Best practices in Trigger and trigger events

  • Best practices include bulkifying triggers, using helper classes, and limiting logic in triggers

  • Trigger events are before insert, before update, after insert, after update, etc.

  • Examples of trigger events include before insert, after update, etc.

Add your answer

Q4. What is connected App, remote site settings and OAuth?

Ans.

Connected App, remote site settings, and OAuth are key components in Salesforce for enabling secure external access to Salesforce data and functionality.

  • Connected App is a framework that enables external applications to securely integrate with Salesforce using APIs.

  • Remote Site Settings allow Salesforce to make callouts to external services over HTTPS.

  • OAuth is an open standard for access delegation, commonly used in Salesforce for authentication and authorization of external a...read more

Add your answer
Discover V Trust Eye Hospital interview dos and don'ts from real experiences

Q5. What type of parameters can be passed to Future?

Ans.

Future methods in Salesforce can accept primitive data types as parameters.

  • Primitive data types like Integer, String, Boolean, etc. can be passed as parameters to Future methods.

  • Non-primitive data types like custom objects or collections cannot be passed as parameters to Future methods.

  • Example: @future public static void myFutureMethod(Integer param1, String param2) { }

Add your answer

Q6. Write a trigger on contact to display the number of contact on Account.

Ans.

Create a trigger on Contact to display the number of contacts on the related Account.

  • Create an after insert, update, delete trigger on Contact object

  • Query for the count of contacts related to the Account

  • Update a custom field on the Account with the count of contacts

Add your answer
Are these interview questions helpful?

Q7. Write lwc code for displaying Accounts with related contacts in a list

Ans.

Display Accounts with related contacts in a list using LWC code

  • Create a Lightning web component (LWC) to display the list

  • Use Apex to query for Accounts and their related Contacts

  • Iterate over the data to display Accounts and their related Contacts in the list

Add your answer

Q8. What are the decorators in Lwc and its uses?

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. How connection is done from Mulesoft to Salesforce

Ans.

Connection from Mulesoft to Salesforce is done using Salesforce Connector in Mulesoft Anypoint Platform.

  • Use Salesforce Connector in Mulesoft Anypoint Platform to establish connection

  • Authenticate using Salesforce credentials (username, password, security token)

  • Utilize Salesforce APIs to interact with Salesforce data

Add your answer

Q10. What is with and without sharing?

Ans.

With and without sharing in Salesforce determines whether sharing rules are enforced for a class.

  • With sharing keyword enforces sharing rules, restricting access to records based on the user's profile and organization-wide defaults.

  • Without sharing keyword does not enforce sharing rules, allowing full access to all records regardless of the user's profile or organization-wide defaults.

Add your answer

Q11. How to pass subjects to future methods?

Ans.

To pass subjects to future methods, use the @future annotation in Apex.

  • Use the @future annotation before the method declaration to indicate that the method will run asynchronously in the future.

  • Pass the subject parameters to the @future method as arguments when calling the method.

  • Ensure that the subject parameters are serializable to be passed to future methods.

Add your answer

Q12. What are the tools for deployment?

Ans.

Tools for deployment include Salesforce DX, Ant Migration Tool, Change Sets, and Metadata API.

  • Salesforce DX is a command-line interface for development and deployment

  • Ant Migration Tool is a Java/Ant-based tool for moving metadata between environments

  • Change Sets allow for moving configuration changes between orgs

  • Metadata API is a web service for managing metadata

Add your answer

Q13. Difference between Future and Queable Apex?

Ans.

Future is asynchronous and runs in a separate thread, while Queueable Apex runs in the same thread but can be queued for execution.

  • Future methods are used for executing code asynchronously, while Queueable Apex is used for chaining jobs and running them in a specific order.

  • Future methods have a limit of 50 per transaction, while Queueable Apex has a limit of 50 jobs in the queue per transaction.

  • Future methods cannot be scheduled, while Queueable Apex can be scheduled for futu...read more

Add your answer

Q14. What is promise and promiseAll?

Ans.

Promise is an object representing the eventual completion (or failure) of an asynchronous operation, and promiseAll is a method that takes an iterable of promises and returns a single Promise that resolves when all of the promises have resolved.

  • Promise is used in JavaScript to handle asynchronous operations.

  • It represents a value that may not be available yet, but will be resolved at some point in the future.

  • PromiseAll is a method that takes an iterable of promises and returns...read more

Add your answer

Q15. What is rollup summary field?

Ans.

Rollup summary field is a field in Salesforce that calculates values from related records and displays the result on a parent record.

  • Rollup summary fields are used to perform calculations on child records and display the result on a parent record.

  • They can be used to calculate the sum, count, minimum, or maximum of a field in related records.

  • For example, a rollup summary field can be used to calculate the total amount of all opportunities related to an account.

  • Rollup summary f...read more

Add your answer

Q16. Write syntax for batch class

Ans.

Batch class syntax in Salesforce

  • Batch class must implement Database.Batchable interface

  • Define start, execute, and finish methods

  • Use Database.executeBatch method to execute the batch class

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter