Salesforce Interview Questions with Answers Part 35

Salesforce Interview Questions with Answers Part 35

1. When will you use Process builder or Workflow?

https://www.infallibletechie.com/2016/07/what-is-difference-between-process.html


2. When a new opportunity is created I need to update the status as Processing, what will you use? Process Builder or Workflow? Why?

Workflow Field Update is preferable because if field update is done using Process builder, then record will go through complete Save cycle again.
If field update is done using Workflow field update, then Custom validation rules, duplicate rules, and escalation rules will not run again.

3. You have a customer sitting in front of you and giving his requirements. You go into your org to check something. How do you identify if you are in FORCE.COM or Salesforce.com ?

Setup keyword in the URL says that we are in Force.com.

4. How can we avoid View State memory error?

https://www.infallibletechie.com/2012/09/view-state-in-salesforce.html


5. what is transient ? is it class level or Object level?

https://www.infallibletechie.com/2016/01/what-is-use-of-transient-keyword-in.html


Class level.

6. Can we use SOSL within triggers? Can we use SOSL within APEX classes?

We can’t use SOSL in Triggers Because the apex developer’s guide says SOSL statements evaluate to a list of lists of sObjects, where each list contains the search results for a particular sObject type. The result lists are always returned in the same order as they were specified in the SOSL query. SOSL queries are only supported in Apex classes and anonymous blocks.You cannot use a SOSL query in a trigger.

7. What is External ID? How it is used? Can it have duplicates?

https://www.infallibletechie.com/2014/11/what-is-external-id-in-salesforce.html


It can contain duplicates. But if unique check box is checked, then it cannot contain duplicates.

8. How is deployment process carried out in FORCE.COM IDE?

Backup from target is archived and then deployed to target.

9. What are the WSDLs that Salesforce offers?

Enterprise WSDL
Partner WSDL
Apex WSDL
Metadata WSDL
Tooling WSDL
Delegated Authentication WSDL

10. What is stateless and state full?

Stateless and State full determines whether to maintain variable value inside the Batch class.

https://www.infallibletechie.com/2014/06/how-to-maintain-variable-value-inside.html


11. If you want an secure interface which one will you use? SOAP or REST?

SOAP

12. Can we update a record in Before Insert using Trigger.New?

No using DML operation since Id won’t be available. Yes without using DML operation for pre-populating field values.

13. Is Static at class level? 

Yes.

14. What is the maximum number of records returned by SOQL ? 

It depends upon the context. Inside the Apex controller it is 50,000.

15. What are the types of SOQL statements in Salesforce?

1.Static SOQL: The static SOQL Statement is written in [] (Array Brackets)

List < String > listTypes = new List < String > {‘Customer’, ‘Partner’};
List < Account > listAcct = [ SELECT Id, Name FROM Account WHERE Type =: listTypes ];

2. Dynamic SOQL: It is used to refer to the creation of a SOQL string at runtime with Apex code.

List < String > listTypes = new List < String > {‘Customer’, ‘Partner’};
List < Account > listAcct = Database.query(‘SELECT Id, Name FROM Account WHERE Type =: listTypes’);

Leave a Reply