+ Start a Discussion
madhumadhu 

workflow on 2 objects

in a custom object there are 2 fields 'A' and 'B' and there are 2 workflows . In 1st workflow when value a=1 then field update b=1 and in 2nd work flow when b=1 then field update a=1. what will be the ouput???? whether we will get any error.
 
Best Answer chosen by madhu
Swayam  AroraSwayam Arora
There can be 2 scenarios:-
1. If you have not checked 'Re-evaluate Workflow Rules After Field Change':- Then workflow 1 will execute and transaction ends. So it will work fine.
2. If you have checked 'Re-evaluate Workflow Rules After Field Change':- It will work fine because when you set A=1 then B will become 1. Now as B=1 the workflow should again update the value A=1, but as A is already 1, it can not be called as an 'Update', so the process ends here.

Please close the thread marking this answer as Best Answer if it really helped. Closing the thread help others finding the correct answer.

All Answers

Swayam  AroraSwayam Arora
There can be 2 scenarios:-
1. If you have not checked 'Re-evaluate Workflow Rules After Field Change':- Then workflow 1 will execute and transaction ends. So it will work fine.
2. If you have checked 'Re-evaluate Workflow Rules After Field Change':- It will work fine because when you set A=1 then B will become 1. Now as B=1 the workflow should again update the value A=1, but as A is already 1, it can not be called as an 'Update', so the process ends here.

Please close the thread marking this answer as Best Answer if it really helped. Closing the thread help others finding the correct answer.
This was selected as the best answer
StephenKennyStephenKenny
Hi Madhu,

I suspect this will work, although it may be inefficient. I think you could acieve the same output with just one workflow rule with two field updates. The workflow rule criteria should be broad enough to accomodate both fields.

Please remember to mark this thread as solved with the answer that best helps you.

Regards
Stephen 
sandeep@Salesforcesandeep@Salesforce
It will depend on "Re-evaluate Workflow Rules After Field Change" and Entry criteria Rules evalution criteria as below
1. If it is every time created both workflow will be executed after another
2. If it is "created, and any time it’s edited to subsequently meet criteria" then it will not as value is not getting updates so it will not evoke another workflow after first.
Please mark it if it was helpful or let me know in case of more help in this case.
Thanks
Sandeep Singhal