+ Start a Discussion
Adeline MooreAdeline Moore 

I need a formula Please.

I want to create a formula that will execute when the "Lead Owner Queue" get changed to a "Lead Owner User". 
Everything I try gives me an error:

 Owner:Queue.Id  ISCHANGED(field) 

Can Someone help me create the right formula Please

Adeline
Best Answer chosen by Adeline Moore
Akhil AnilAkhil Anil

@Roshni : The approach you have chosen will basically fire the email alert every time the record is edited irrespective of whether the owner has been changed or not. Also, it's not a good practice to check for hardcoded prefix values of an ID. 

@Adeline : I would recommend you to use the workflow for this because as of today process builder has some known issues when working with the Owner field and produces some undesirable results. The workflow is more robust when it comes to handling the Owner field. No doubt, that process builder is much more advanced than workflows. However it keeps getting refined and we should soon be able to use it for all the scenarios.

Let's stick to the workflow rule to achieve this now. The criteria should be such that it should fire the workflow only when the Owner is changed from a Queue to a User. The evaluation criteria of the workflow should "created and every time it's edited" i.e. the 2nd Option.

The formula for the criteria of the workflow will be this

 

AND(
ISCHANGED(OwnerId),
NOT(ISBLANK(Owner:User.Id))
)

That's it !

All Answers

RD@SFRD@SF
Hi Adeline,

Try this
ISCHANGED(Owner:Queue.Id)

Hope it helps
RD
Adeline MooreAdeline Moore
Ok So I deactivated the Workflow rule with email alert for this and am just focusing on the process builder for this. I tried using the Formula you listed above and I get this error
User-added image

 
Ram SRam S
Hi Adeline,
 if you are using Process Builder, you can use the standard built in IsChanged function by giving value as TRUE.

try this.. hope it will work

Thanks,
Ram
RD@SFRD@SF
Hi Adeline

From you other post  (https://developer.salesforce.com/forums/ForumsMain?id=9060G000000I3ymQAC)

Can you change the value accordingly
 
ISCHANGED([Lead].Owner:Queue.OwnerId)

Basically we are comparing if the value is getting changed.
If it doesnot work try getting the value from the formula builder itself.

Regards
Rd
Roshni RahulRoshni Rahul
Hi Adheline,
Please try this the below formula field in your process builder.

 ISCHANGED([Lead].Owner:Queue.OwnerId)

It works fine for me.

Regards
Roshni


 
Adeline MooreAdeline Moore
 Here is the Whole Process With your Formula and failure report :(
User-added image
User-added image
User-added image
User-added image

Here it the email failure report

User-added image
Roshni RahulRoshni Rahul
Hi,

I got solution for you. now its working perfectly for me and i am getting alert email.
try the below code.

User-added image

Here OOG should be letter [oh] not digit zero. If its working for you, mark my aswer as best answer.

Happy coding.
Regards
Roshni
Roshni RahulRoshni Rahul
 NOT( CONTAINS([Lead].OwnerId, 'OOG'))
Roshni RahulRoshni Rahul
User-added image
Akhil AnilAkhil Anil

@Roshni : The approach you have chosen will basically fire the email alert every time the record is edited irrespective of whether the owner has been changed or not. Also, it's not a good practice to check for hardcoded prefix values of an ID. 

@Adeline : I would recommend you to use the workflow for this because as of today process builder has some known issues when working with the Owner field and produces some undesirable results. The workflow is more robust when it comes to handling the Owner field. No doubt, that process builder is much more advanced than workflows. However it keeps getting refined and we should soon be able to use it for all the scenarios.

Let's stick to the workflow rule to achieve this now. The criteria should be such that it should fire the workflow only when the Owner is changed from a Queue to a User. The evaluation criteria of the workflow should "created and every time it's edited" i.e. the 2nd Option.

The formula for the criteria of the workflow will be this

 

AND(
ISCHANGED(OwnerId),
NOT(ISBLANK(Owner:User.Id))
)

That's it !
This was selected as the best answer
Adeline MooreAdeline Moore
Thank you I was getting mutiple email alerts and after i deactivated the process and just went with workflow it worked!!!