You need to sign in to do that
Don't have an account?
Matt Folger
Trying to add a ownerID check to this Workflow Rule criteria.
Presently I have this workflow rule logic that checks to see if a certain set of subtasks by a certain department is completed and if so it passes ownership to the next user in the process. The problem is that is doesn't check who was previous owner and therefore the logic is flawed. If one of these processes gets further along it'll keep firing, rather than just the 1 time that I goes between departments.
AND( NOT(ISBLANK( TEXT(Competitive_Analysis__c) )) , NOT(ISBLANK(TEXT(Catalog_Item_UDF__c))) , NOT(ISBLANK(TEXT(Market_Driven_Price_UDF__c ))), NOT(ISBLANK( TEXT(Packaging_and_Label_Specifications__c)) ), NOT(ISBLANK( TEXT(Recommendations_for_Stock_Levels__c)) ) , NOT(ISBLANK(TEXT( Replace_Other_Product_and_Obsolescence__c ))), NOT(ISBLANK(TEXT( Requirements_Document__c) )), NOT(ISBLANK(TEXT( Sales_Training_CSA__c ))) , NOT(ISBLANK(TEXT( Sales_Training_RSM__c ))))
I've tried to add some "OwnerID" logical operators but it keeps telling me that my users don't exist, their login names, their userIDs, their aliases. Nothing works. How would I add a logical check in the above formula to check for existing owner and only fire if it was owned by the previous owner and only if all their tasks were completed.
AND( NOT(ISBLANK( TEXT(Competitive_Analysis__c) )) , NOT(ISBLANK(TEXT(Catalog_Item_UDF__c))) , NOT(ISBLANK(TEXT(Market_Driven_Price_UDF__c ))), NOT(ISBLANK( TEXT(Packaging_and_Label_Specifications__c)) ), NOT(ISBLANK( TEXT(Recommendations_for_Stock_Levels__c)) ) , NOT(ISBLANK(TEXT( Replace_Other_Product_and_Obsolescence__c ))), NOT(ISBLANK(TEXT( Requirements_Document__c) )), NOT(ISBLANK(TEXT( Sales_Training_CSA__c ))) , NOT(ISBLANK(TEXT( Sales_Training_RSM__c ))))
I've tried to add some "OwnerID" logical operators but it keeps telling me that my users don't exist, their login names, their userIDs, their aliases. Nothing works. How would I add a logical check in the above formula to check for existing owner and only fire if it was owned by the previous owner and only if all their tasks were completed.
My suggestion is I think you'll have to write a trigger that saves the previous owner in a custom field so your VR can ge to it -- for example, on an account;
...Then you should be able to get to it in a VR;
AND( NOT(ISBLANK( TEXT(Competitive_Analysis__c) )) ,
NOT(ISBLANK(TEXT(Catalog_Item_UDF__c))) ,
NOT(ISBLANK(TEXT(Market_Driven_Price_UDF__c ))),
NOT(ISBLANK( TEXT(Packaging_and_Label_Specifications__c)) ),
NOT(ISBLANK( TEXT(Recommendations_for_Stock_Levels__c)) ) ,
NOT(ISBLANK(TEXT( Replace_Other_Product_and_Obsolescence__c ))),
NOT(ISBLANK(TEXT( Requirements_Document__c) )),
NOT(ISBLANK(TEXT( Sales_Training_CSA__c ))),
NOT(Previous_Owner__c = $User.Id),
NOT(ISBLANK(TEXT( Sales_Training_RSM__c ))))
BTW- You should add logic for the case of the previous owner being a queue.
Also, you might want to make a before insert trigger to populate the Previous_Owner__c field of your record.
All Answers
More over there are few limitations in workflows, like you can use ISCHANGED logic only in one evaluation criteria etc..,
Hope thsi helps !!
My suggestion is I think you'll have to write a trigger that saves the previous owner in a custom field so your VR can ge to it -- for example, on an account;
...Then you should be able to get to it in a VR;
AND( NOT(ISBLANK( TEXT(Competitive_Analysis__c) )) ,
NOT(ISBLANK(TEXT(Catalog_Item_UDF__c))) ,
NOT(ISBLANK(TEXT(Market_Driven_Price_UDF__c ))),
NOT(ISBLANK( TEXT(Packaging_and_Label_Specifications__c)) ),
NOT(ISBLANK( TEXT(Recommendations_for_Stock_Levels__c)) ) ,
NOT(ISBLANK(TEXT( Replace_Other_Product_and_Obsolescence__c ))),
NOT(ISBLANK(TEXT( Requirements_Document__c) )),
NOT(ISBLANK(TEXT( Sales_Training_CSA__c ))),
NOT(Previous_Owner__c = $User.Id),
NOT(ISBLANK(TEXT( Sales_Training_RSM__c ))))
BTW- You should add logic for the case of the previous owner being a queue.
Also, you might want to make a before insert trigger to populate the Previous_Owner__c field of your record.
Thanks, I "cheated" and ended up creating some "N+1" logic that I think will actually serve me better as it would be individual independant in case there are some terminations, or staffing changes in the future, I won't have to adjust my app.
Thanks for the replies!