Premium Employer

Infosys

3.7
based on 37k Reviews
Filter interviews by

30+ Coditas Technologies Interview Questions and Answers

Updated 16 Nov 2024
Popular Designations

Q1. How do you make the child records read only of its parent record's field is updated to some value

Ans.

Child records can be made read-only when parent record's field is updated using validation rules.

  • Create a validation rule on child object

  • Use ISCHANGED() function to check if parent field is updated

  • Use PRIORVALUE() function to get the previous value of parent field

  • Use ISBLANK() function to check if the previous value of parent field is blank

  • Use ISNEW() function to allow creation of child records

  • Use OR() function to combine all conditions

  • Throw an error message if all conditions...read more

Add your answer

Q2. How do you call a controllor method from javascript in visualforce page?

Ans.

To call a controller method from JavaScript in a Visualforce page, use the actionFunction tag.

  • Create a controller method in the Apex class.

  • Add an actionFunction tag in the Visualforce page.

  • Call the actionFunction from JavaScript using its name.

  • Pass parameters to the controller method using the actionFunction tag.

  • Use the rerender attribute to update the page after the controller method is called.

Add your answer

Q3. How do load both parent and child records at a time using data loader?

Ans.

Use data loader's parent-child functionality to load both parent and child records at once.

  • Create a CSV file with both parent and child records

  • Use the data loader's parent-child functionality to map the relationship between the two

  • Ensure that the parent records are loaded before the child records

  • Use the data loader's insert or upsert operation to load the data

Add your answer

Q4. What are the collectio variables and when do we use them in apex?

Ans.

Collection variables are used to store multiple values of the same data type in Apex.

  • Collection variables include Lists, Sets, and Maps.

  • Lists are ordered collections of elements that can contain duplicates.

  • Sets are unordered collections of unique elements.

  • Maps are collections of key-value pairs.

  • Collection variables are useful for iterating over multiple values and performing operations on them.

  • Example: List names = new List{'John', 'Jane', 'Bob'};

  • Example: Set numbers = new Se...read more

Add your answer
Discover Coditas Technologies interview dos and don'ts from real experiences

Q5. Write a trigger to update a field on child record a default value if the child record is the only child of parent

Ans.

Write a trigger to update a field on child record with default value if it is the only child of parent

  • Create a trigger on the child object

  • Query for the parent record and check if it has only one child record

  • If the parent has only one child, update the field on the child record with the default value

Add your answer

Q6. Write a trigger to update StageName on Opportunity whenever the Account Active field is set to Yes

Ans.

Trigger to update StageName on Opportunity when Account Active field is set to Yes

  • Create a trigger on Account object

  • Query for related Opportunities

  • Update StageName field on Opportunities where Account Active is Yes

Add your answer
Are these interview questions helpful?

Q7. Syntax of batch class, future method

Ans.

Batch class and future method syntax in Salesforce development.

  • Batch class syntax: Implements Database.Batchable interface, has start(), execute() and finish() methods.

  • Future method syntax: Has @future annotation, returns void, takes parameters.

  • Example batch class syntax: public class MyBatch implements Database.Batchable { ... }

  • Example future method syntax: @future public static void myFutureMethod(String param) { ... }

Add your answer

Q8. Write a trigger to update field on child record from parent record.

Ans.

Use trigger to update child record field from parent record

  • Create a trigger on the parent object

  • Query for the child records related to the parent record

  • Update the field on the child records with the desired value

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

Q9. When would trigger be in read only context?

Ans.

Triggers are in read-only context when they are executed in a transaction that is read-only.

  • Triggers are in read-only context when they are executed in a transaction that is read-only.

  • This can happen when triggers are fired by a record being deleted, undeleted, merged, or when a workflow rule or process builder updates a record.

  • In read-only context, triggers cannot perform DML operations like insert, update, delete, undelete on other records.

Add your answer

Q10. Write a LWC to display contacts associated to an account.

Ans.

LWC to display contacts associated to an account

  • Create an Apex class to fetch contacts associated with the account

  • Use Lightning Data Service to retrieve account details

  • Display contacts in a Lightning web component using HTML and CSS

Add your answer

Q11. what are the trigger events in Salesforce

Ans.

Trigger events in Salesforce are actions that can cause a trigger to execute.

  • Before Insert

  • Before Update

  • Before Delete

  • After Insert

  • After Update

  • After Delete

  • After Undelete

Add your answer

Q12. Parent to child and child to parent communication in LWC

Ans.

Parent to child and child to parent communication in LWC

  • Use @api decorator to expose properties from parent to child

  • Use CustomEvent to communicate from child to parent

  • Use Lightning Message Service for communication between unrelated components

Add your answer

Q13. How can we achieve record sharing in salesforce

Ans.

Record sharing in Salesforce can be achieved through sharing rules, manual sharing, and criteria-based sharing.

  • Use sharing rules to automatically grant access to certain records based on criteria

  • Use manual sharing to manually grant access to specific users or groups

  • Use criteria-based sharing to define sharing rules based on specific criteria

Add your answer

Q14. Trigger to count no of opportunitylineitems and display in Accout custom field

Ans.

Create a trigger to count Opportunity Line Items and display in Account custom field

  • Create a trigger on OpportunityLineItem object

  • Use SOQL query to count the number of Opportunity Line Items related to the Account

  • Update the custom field on Account with the count value

Add your answer

Q15. write rollup summery on account object and contact

Ans.

A roll-up summary field calculates values from related records and displays the result on a parent record.

  • Roll-up summary fields can be created on the parent object to display aggregated data from child records.

  • They can be used to calculate the sum, count, minimum, maximum, or average of a field on the child object.

  • Roll-up summary fields are automatically updated when the child records are created, edited, or deleted.

  • They can be used to display information like the total amou...read more

Add your answer

Q16. 1. Write a trigger for de-duplication of records

Ans.

A trigger for de-duplication of records in Salesforce

  • Create a trigger on the object you want to de-duplicate

  • Use SOQL query to find duplicate records based on specific criteria

  • Merge duplicate records or mark them as duplicates

Add your answer

Q17. How to call LWC from flows

Ans.

To call LWC from flows, create an Aura component that wraps the LWC and call the Aura component from the flow.

  • Create an Aura component that wraps the LWC component

  • Expose the LWC component as a public property in the Aura component

  • Call the Aura component from the flow using the 'Lightning Component' element

Add your answer

Q18. Explain composite resources in salesforce?

Ans.

Composite resources in Salesforce are resources that represent multiple related objects in a single request.

  • Composite resources allow you to make multiple API calls in a single request, reducing network latency and improving performance.

  • They are useful for operations that involve multiple related objects, such as creating a new account and related contacts in a single transaction.

  • Composite resources can be used with REST API and Bulk API in Salesforce.

Add your answer

Q19. what is permission set

Ans.

Permission set is a collection of settings and permissions that define what a user can do in Salesforce.

  • Permission set is used to grant additional permissions to users beyond their profile settings.

  • It allows administrators to give specific access to objects, fields, tabs, and other features.

  • Multiple permission sets can be assigned to a user to provide a combination of permissions.

  • Permission sets can be used to extend the functionality of profiles without changing the profile ...read more

Add your answer

Q20. Apex trigger to update lastName

Ans.

Apex trigger to update lastName

  • Create an Apex trigger on the object where lastName needs to be updated

  • Use trigger.new to access the records being updated

  • Update the lastName field with the desired value

Add your answer

Q21. What are decorators in LWC

Ans.

Decorators in LWC are functions that are used to modify the behavior of class properties or methods.

  • Decorators are used to add metadata to class members in Lightning Web Components.

  • They are declared using the @ symbol followed by the decorator name.

  • Decorators can be used for various purposes such as tracking changes, validating input, or controlling access to properties.

Add your answer

Q22. what is a sandbox?

Ans.

A sandbox is a separate environment for testing and developing applications without affecting the production environment.

  • A sandbox is a copy of the production environment where developers can experiment and make changes without impacting live data.

  • It allows developers to test new features, configurations, and integrations before deploying them to the production environment.

  • Sandbox environments can be refreshed with the latest data from the production environment to ensure acc...read more

Add your answer

Q23. Explain Mixed DML error?

Ans.

Mixed DML error occurs when DML operations on setup and non-setup objects are mixed in a single transaction.

  • Occurs when trying to perform DML operations on both setup and non-setup objects in a single transaction

  • Setup objects include User, Profile, PermissionSet, etc.

  • Non-setup objects include custom objects, standard objects like Account, Contact, etc.

  • Can be resolved by splitting the DML operations into separate transactions or using @future annotation for one of the operatio...read more

Add your answer

Q24. what is Batch Apex

Ans.

Batch Apex is a Salesforce feature that allows for processing large amounts of data in batches to prevent hitting governor limits.

  • Batch Apex is used to handle large data volumes by breaking the processing into smaller batches.

  • It is useful for operations like data cleansing, data migration, and data integration.

  • Batch Apex jobs can be scheduled to run at specific times or can be executed manually.

  • It helps in preventing hitting governor limits like CPU time limit and heap size l...read more

Add your answer

Q25. How do you debug LWC

Ans.

Debugging LWC involves using browser developer tools, console logs, and Salesforce Lightning Inspector.

  • Use browser developer tools to inspect elements and check for errors.

  • Utilize console logs to track variables and identify issues in the code.

  • Use Salesforce Lightning Inspector to debug server-side Apex calls and network requests.

Add your answer

Q26. Decorators in lwc

Ans.

Decorators in LWC are special functions that can be used to modify the behavior of a class or its members.

  • Decorators are declared using the @ symbol followed by the decorator name.

  • They can be used to add metadata, modify class behavior, or extend functionality.

  • Some commonly used decorators in LWC include @api, @wire, and @track.

  • Example: @api decorator is used to expose a property or method to be used in parent components.

View 1 answer

Q27. what is batch class

Ans.

Batch class is used in Salesforce to process large amounts of data asynchronously.

  • Batch class is used to handle large data volumes in Salesforce.

  • It allows you to break down a large job into smaller chunks for processing.

  • Batch class implements the Database.Batchable interface in Salesforce.

  • Example: A batch class can be used to update all account records in Salesforce.

  • Example: A batch class can be used to delete all old records from a custom object.

Add your answer

Q28. best practices of trigger

Ans.

Best practices for triggers in Salesforce development

  • Use trigger handlers to separate logic from the trigger itself

  • Avoid using SOQL queries or DML statements inside loops

  • Leverage bulkification to process records in batches

  • Consider using trigger frameworks for better organization and maintainability

  • Write unit tests to ensure trigger functionality and coverage

Add your answer

Q29. REST SOAP APIs differences

Ans.

REST and SOAP APIs are different in terms of architecture, communication, and data formats.

  • REST is based on HTTP protocol and uses standard methods like GET, POST, PUT, DELETE, while SOAP is a protocol-agnostic and uses XML for communication.

  • REST is lightweight and easier to use, while SOAP is more rigid and has more security features.

  • REST APIs are stateless, while SOAP APIs can maintain state between requests.

  • REST APIs are more popular for web services, while SOAP APIs are c...read more

Add your answer

Q30. Asynchronous Apex

Ans.

Asynchronous Apex is used to run processes in the background without user interaction.

  • Asynchronous Apex is used for long-running processes, such as callouts to external systems or batch processing.

  • It allows for better performance by not blocking the user interface while the process is running.

  • Examples include @future methods, Queueable Apex, and Batch Apex.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Coditas Technologies

based on 27 interviews in the last 1 year
1 Interview rounds
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Salesforce Developer Interview Questions from Similar Companies

3.8
 • 24 Interview Questions
3.8
 • 22 Interview Questions
3.9
 • 17 Interview Questions
3.8
 • 15 Interview Questions
3.4
 • 13 Interview Questions
3.9
 • 12 Interview Questions
View all
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