Salesforce Interview questions with answers Part 6

Salesforce Interview questions with answers Part 6

1. I have an account object, I have a status field which has open and completed checkboxes, when ever I click on completed, I want an opportunity to be created automatically. Through which we can achieve in salesforce?


2. What are workflows and what actions can be performed using workflows?

Workflows are used for automation.

  • Field Update
  • Outbound Messages
  • Email Alert
  • Task

3. What are types of workflows?

  • Immediate Workflow Actions
  • Time-Dependent Workflow Actions

4. Can you tell me what is time based workflow?

Time Based workflow will be triggered at what time we define while creating the Time-Dependent workflow rule.

5. Can you give me situation where we can you workflow rather than trigger and vice versa?

If you want to perform any action after some action, we can go for Workflow Rule.
If you want to perform any action before and after some action, we can go for Trigger.

6. Lets say I have a requirement whenever a record is created I want to insert a record on some other object?

Triggers can be used for this.

7. Whenever a record is inserted in contact I want insert a record in opportunity as well, we can’t do it with workflow right how would you do it with trigger?

We can get the Account Id from the Contact and we can create an Opportunity under the Account.

8. What is the difference between and trigger.newmap? can be used in before and after operations.

Trigger.newMap can be used in after insert and after and before update.

9. Can you tell me what is the difference between apex:actionfunction and apex:actionpoller? Is there any way that we can do the same functionality of apex:actionpoller do?

apex:actionPoller is used to call an Apex method for the interval of time specified.

apex:actionFunction is used to call Apex method from Javascript.

Using setTimeOut in Javascript, we can achieve apex:actionPoller functionalities.
10. What is apex:composition? Is it a tab in visual force page?

11. Where is apex:insert used?

12. You have VF page and whenever you click a button it should go to google,so how would you do that?

Use pageReference and give the google URL in that.

13. I have an opportunity object, which is having two values like open and close,i have a workflow rule,if a particular object is in open status,it should be updated to close and if status is close it should be updated to open,how should salesforce behave. what would happen to record,how would salesforce behave here?

It causes looping error.

One thought on “Salesforce Interview questions with answers Part 6

Leave a Reply