Thursday, November 26, 2015

Interview Questions on Workflows and Approval Process In salesforce

1. What is work flow ?
Ans: Work flow works based on certain criteria,By using workflow we can automate the business process like Email alerts,tasks,filed updates

2. What are the different kinds of evaluation criteria’s (events)?
Ans: 1.created
2.created, and every time it’s edited
3.created, and any time it’s edited to subsequently meet criteria

3. In which object workflows are stored?
Ans: Workflow

4. What is the difference between Created and everytime edited to meet the criteria and Created and edited to subsequently meet the criteria?
Ans: If we select 'Created and everytime edited to meet the criteria' whenever we create a record or edit a record if the criteria of the workflow rule meets then it will trigger every time. If we select 'Created and edited to subsequently meet the criteria' -

While creating the record criteria meets so that workflow will fire and while editing the record again criteria meets workflow won't fire (meeting the criteria to meeting the criteria)
While creating the record criteria doesn't meet so workflow won't fire and while editing the record workflow criteria meets then workflow will fire (not meeting the criteria to meeting the criteria)
Conclusion: Previous state of record should be not meeting criteria and current state of record should be meeting the criteria then only in current state workflow will fire.

5.What are the types of rule criteria’s?
Ans: 1.Criteria meet (field - operator - value, if there are multiple criteria’s then in filter criteria we can give conditions like ( 1 or 2) and 3, field to field comparison is not possible, we can't fetch the previous state information of the field )
2.Formula evaluated (we can write formulas with this we can do field to field comparison and we can fetch previous state value of the record)

6. What is immediate workflow action?
Ans: The action which will be performed immediately after the record criteria meets.

7. What is time dependent workflow action?
Ans: The action which will be performed in future based on the any of the date field. To create time dependent workflow action we should create one time trigger. in time trigger we can give either days or hours with the maximum of 999 value and we can select either before or after.

8. For which event we can't create time dependent workflow action?
Ans: Created and everytime edited to meet the criteria.

9. What are the different kinds of workflow actions?
Ans: New field update (we can update a field of the same object or the fields of the parent objects which are at master side in master-detail relationship, only for master-detail parent objects we can update the field and for lookup we can't update)
New email alert (we can send emails if the criteria meets)
New task (we can create new task)
New outbound Message (we can make a callout)

10. What are the types of email templates?
Ans:1.Text
2.HTML (with letter head)
3.Custom HTML (without letter head)
4.Visual Force

12. How can you monitor future actions of time based workflow?
Ans: setup --> administration set up --> monitoring --> time based workflow

13. There is a timebased workflow which will update one of the fields if the criteria meet. User submits the record with valid criteria, workflow triggered so that the field update is queued in the 'time based flow' queue which will fire after one day. If the user modifies the record which is submitted before the scheduled date, after modification, a record criterion is not meeting. Whether the field will be updated or not in schedule date?
Ans: It won't trigger in the schedule date because if we modify the record to not meeting criteria that queued field update will be removed from the 'time based flow' queue.

14. For the same scenario explained in the above question what happens when we deactivate or modify the criteria of the workflow to different criteria? Whether the field will be updated or not in schedule date?
Ans: Yes, It will trigger in scheduled date.

15. Scenario: There are two workflow rules on the same object say namely wf1 and wf2. If wf1 fires then a field will be updated on the same object, if the field updated and due to this wf2 criteria meets then what will happen, wf2 will fire or not?
Ans: It won't fire. To fire wf2 we should enable 'Re-evaluate Workflow Rules' checkbox of the field update which is there in wf1.

16. What is recursive workflow rule? How to avoid recursive workflow rules?
Ans:Whenever we enable Re-evaluate Workflow Rules after Field Change checkbox in the Field Update of a workflow rule, due to this field update other workflow rules on the same object will be fired if the entery criteria of those workflow rules satisfied.

Incase, in other workflow rules also if we enable Re-evaluate Workflow Rules after Field Change checkbox in the Field Update recursive workflow rules will come in some scenarios.

We can take two steps to avoid recursive workflow rules -

For the workflow Evaluation Criteria if you choose created, and any time it’s edited to subsequently meet criteria option, we can avoid recursive workflow rules.
If you don't enable Re-evaluate Workflow Rules after Field Change checkbox in the Field Update of a workflow rule we can avoid.

17. What is Approval Process?
Ans: If the criteria of the record meets then by clicking on submit for Approval button user can submit the record for approval (Note: Approval history related list should be displayed on the record detail page)

18. Scenario: After activating the approval process, I want to add one more step. Is it possible?
Ans: It’s not possible, to add one more step deactivate the approval process and clone the deactivated approval process and add the new steps.

19.In which object all Approval process are stored?
Ans: Approval

8 comments:

  1. Reg Q 15. Without checking the checkbox 'Re-evaluate Workflow Rules' in my first workflow rule, the second workflow is getting fired because of the field update happened due to first workflow.

    Can you please explain why?

    ReplyDelete
  2. Hi My dear friend,
    Please check it it one more time.Whats the point he mentioned in Q.15 is proper.

    ReplyDelete
    Replies
    1. I have posted my scenario in the comments.. can you please look into that and clarify me if I am having wrong understanding about workflows

      Delete
  3. This is my scenario..

    WF1 - set to Created and everytime it is edited
    - Object : XYZ
    - Rule Criteria : value in Field A (picklist) = alpha
    - Immediate Action : Set value of Field B (picklist) to bravo
    - Re-evaluate Workflow check-box : Not Selected

    WF2 - set to Created and everytime it is edited
    - Object : XYZ
    - Rule Criteria : value in Field B (picklist) = bravo
    - Immediate Action : Set value of Field C (picklist) to charlie
    - Re-evaluate Workflow check-box : Not Selected

    Now creating a record for object XYZ with Field A value as alpha.

    After creating record
    Field A - alpha
    Field B - bravo
    Field C - charlie

    Creating record with Field A = alpha will trigger WF1 and changes value of Field B to bravo.
    this field update will trigger WF2 and changes value of Field C to Charlie.
    Note* : Re evaluate Workflow rule is not selected.

    From my understanding the WF2 should not fire if the re evaluate check box is not marked in first WF1.

    Can anybody please explain this situation ?

    ReplyDelete
    Replies
    1. Yes, WF2 will not fire if the re-evaluate check box is unchecked.
      Salesfoce will verify all the Workflow rules and group the actions whichever WF criteria are true.
      Here only WF1 is meting the criteria and WF1 action is performed. as re-evaluate check box is unchecked. It will not perform further any action.

      Delete
  4. It should be trigger on same field A not on different field.if we want to update same field by using workflow rule we can re-evaluate check box.if im wrong pls correct me

    ReplyDelete
  5. IF A WORKFLOW AND TRIGGER BOTH IS ACTIVATED ON A OBJET FOR SAME ACTION, HOW CAN I BYPASS WORKFLOW WITH OUT DEACTIVATING WORKFLOW.

    ReplyDelete
  6. Hello Team

    I just want to know we have created approval process and if suppose record is rejected in 3 step then again we want it to start from step 1 i.e again record need to submit and further process and so on. Can anyone please let me know how we can implement this.

    ReplyDelete