50 Most Trendy Salesforce Interview Questions ! – ForceBase
SOQL: Salesforce Object Query Language, we can query all the fields, search one . 8 – What is Master-Detail Relationship in Salesforce?. In Salesforce terms, each of those relationships is a master-detail relationship except for the very last one, which is a lookup relationship from. This works SELECT Name, Id, (SELECT Name from Object_Status_Relationship__r ORDER BY CreatedDate DESC LIMIT 1) from Object__c.
Yes user can upload their custom logo in documents and then they choose that logo for organization. Q39 List things that can be customized on page layouts?Understanding Salesforce Relationships - Decoding - Lookup or Master-detail
We can also create sections. Self Relationship is a lookup relationship to the same object. Here we can create relationship in between the Account to Account same object object. Record level access is determined by the parent, Mandatory on child for reference of parent, cascade delete if you delete the parent, it can cascade delete the child.
Q42 What is the difference between trigger and workflow? Workflow Workflow is automated process that fired an action based on Evaluation criteria and rule criteria. We can access a workflow across the object.
We cannot perform DML operation on workflow We cannot query from database Trigger Trigger is a piece of code that executes before or after a record is inserted or updated. We can access the trigger across the object and related to that objects We can use 20 DML operations in one trigger. Q43 What is Wrapper class? A Wrapper class is a class whose instances are collection of other objects.
It is used to display different objects on a VF Visual Force page in same table.
- 50 Most Trendy Salesforce Interview Questions !
- Salesforce - Master Detail Relationship
- Getting Started with SOQL by Magulan D
We can perform DML operation on sql query results. We can query only on fields whose data type is text,phone and Email. We cannot perform DML operation on search results. Using insert method we can insert the records but if any error occurs in any record system will throw an error insertion fail and none of the records are inserted.
If we want to execute partially success of bulk insert operation we will use database. Q46 What is Static Resources?
If we add a user to a role, the user is above in the role hierarchy will have read access. Defines the base line setting for the organization. Manual Sharing is sharing a single record to single user or group of users.
We can see this button detail page of the record and this is visible only when OWD setting is private. Criteria Based Sharing rules: If we want to share records based on condition like share records to a group of users Whose criteria are country is India.
Share object is available for every object For Account object share object is AccountShare.
SOQL Query to Reference Parent Object's Fields
If we want to share the records using apex we have to create a record to the share object. An example of doing so: To find out if a particular user has Edit access to a record, use the UserRecordAccess object.
This object is available in API version You can use SOQL to query this object to find out if the user has edit access to the record in question. Also, only a maximum amount of recordIds can be checked in one query. There is a class, Limits, that contains a number of static methods that allow you to check your governor limit consumption, see: Q54 What is a concise function that formats a String decimal into a currency format in Apex?
I updated to delegate to Math.
Salesforce Interview Questions
It now passes all my unit tests, which you can see here: Both future methods and callouts can be unit tested. To test future methods simply make your call to any future method between Test. See the documentation for the Test class here: Test Testing callouts is a bit trickier though. Just replace that static variable with a call to Test.
That example can be found here: The Analytics API lets you integrate Salesforce report data into your apps programmatically and has several resources that let you query metadata, and record details.
Customers can have validation on custom fields via validation rules and triggers, so handling that in your unit tests without customer intervention is next to impossible. The first step to reducing issues is to have your test data populate all standard fields and ensure the data uses the most common formatting for your customer base US style phone numbers and addresses for the US for example.
Basically you define a test data generation interface and the customer creates an Apex class to generate data for you.
The Best Salesforce Interview Questions & Answers [UPDATED]
Suppose there are 2 Account records with 3 contacts associated against each Account record. List 3 Governor limits in Apex. How can two components who are not related to each other, interact with each other in lightning?
Is it possible to invoke an addError operation on the Trigger. Old list in a delete operation in Trigger? What should be done to override the governor limit that restricts you from fetching more than 50, records in a SOQL query? There is a master-detail relationship between two objects and I want to ensure that the master object should not have more than 10 child records.
How can we achieve this without using a trigger? What are skinny tables? What are they used for? What is the use of testsetup annotation in a test class? How can a test class access the private members of another class? What are lightning events?
Where do you use them? Can we call a batch apex program in apex trigger? I want to ensure that once a child record has been added to a master-detail relationship, it cannot be deleted. How can we achieve this using the declarative capability of the platform? So, what will happen when a user saves the record in that object through that page layout? What are the different types of attributes that can be added to a lightning component?
What is the difference between application level events and component level events in lightning? What is the difference between pageblocktable and datatable in VF pages? Explain the different scenarios wherein you need to use different types of collections i. What would happen if I perform a DML update operation on the before update trigger of the same sObject record?
How do you create RESTful web services using apex? How do you implement Aggregate functions in apex? What is the difference between custom objects, custom settings and custom meta data?
What is the use of communities in Salesforce? List the important methods in List, Set and Map What are future methods and where are they used?