function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PkPk 

Hello and welcome, I'm asking for help in doing this task and send it here or to my email and I'll understand what needs to be done, thank you in advance and bless you

 1. Create a new field on Case: Name: Owners Manager Email Type:    Email  

2. Create a Flow (autolaunched) and a Process Builder:  Flow Name: Case Owner Manager Email Flow Description: This flow is used to update Owners Manager Email field when Case is created or when the case owner is changed. Logic:

1. Check if the case owner is a User or a Queue.

2. If the owner is a Queue, or a User that has no manager, do nothing.

3. Else (the owner is a user with a manager), populate the field "Owners Manager Email" with the email of the owners Manager.  

PB Name: Case PB Criteria: When Case is created or the case Owner is changed. Action: Launch Flow.

3. Create a Screen Flow & Action: Flow Name: Create Contact Flow Description: Screen flow to make it easier to create a contact.

Logic:

1. Show a screen with those contact fields:  First name, Last name, Mobile and Email.

2. Check if a contact with the same mobile OR email already exist in the system.

3. If such contact already exists, show a screen "Contact already exist for Account xxxx" where xxxx is the Account name of that contact.

4. If the  contact does not exist, create new contact under the current
Account.

Create an Action on Account object that will launch the above flow OR put the flow on the Account Lightning page. 

Thank you very much.
Best Answer chosen by Pk
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

Can you try the below flow for requirement1.

You have to create record triggered flow and select Object as Case.

Formule:

OR(ISNEW(), ISCHANGED({!$Record.OwnerId}))

User-added image

Add a decision box to check if the owner is user and he has manager field as below.

User-added image
Now select update triggered record element and add the update as below.

User-added image

Entire flow looks as below.

User-added image

Can you test this and cofirm if this is working as expected so I can prepare the second flow .

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick ,

Here we have two requirements One to populate the Owner manager field on New field created on case and I guess this should be record triggered flow and Process Builder is not required at all.

Second one ois to create Contact from Account which we need a screenflow to lauch from Account action .

Can you correct me on my understanding.

Thanks,
 
PkPk
Greetings,

Thank you very much for trying to understand and help.

You have indeed understood very correctly, you are right and there is no need for a PB to activate the FLOW, but nevertheless, it is their requirement to also produce a PB to activate the FLOW.

Regarding the additional task, you really need to create a new 'contact'.

Can you please go through the assignment again and try to implement it for me or send screenshots of the FLOWS that support it?

Thanks in advance,
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

Thanks for confirmation. I will implement the flow and come with screenshots for the same.

Thanks,
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

One final confirmation needed is as salesforce itself is suggesting to stop creating new processs Bilders and workflows instead asking to create flows.

I dont't think it would be best option to call flow from process Builder.

Thanks,
 
PkPk
Okay, we'll do it without PB, do you have a view of it?
Thank you very much indeed for the extensive assistance.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

Thanks for confirming on it. Yes I will start working on it and update you with first flow in some time.

Please do not post duplicate questions for this as it may cause duplicate efforts .
Thanks,
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

Can you try the below flow for requirement1.

You have to create record triggered flow and select Object as Case.

Formule:

OR(ISNEW(), ISCHANGED({!$Record.OwnerId}))

User-added image

Add a decision box to check if the owner is user and he has manager field as below.

User-added image
Now select update triggered record element and add the update as below.

User-added image

Entire flow looks as below.

User-added image

Can you test this and cofirm if this is working as expected so I can prepare the second flow .

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
This was selected as the best answer
PkPk
Hello Sai,
thank you very much, it's exactly that 👏
and it's very good👏 Please can continue to the next step
I thank you very much, in the test it worked perfectly.
There's just something essential that I can't understand, what is the difference between a queue and a user, that is, how do I display a 'case' of a queue in the system compared to a 'case' of a user?  And why does queue start (or not start) with 005?  
I am happy and waiting for your answer to question 3.

May you have all the blessings in the world.

Thank in advance,
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

Good to know that the solution worked Queue means group of users and Queue id always start with 00Q and where as Userid always starts with 005. 

So we have used that to check if that is queue or User.

Hope this answers your question. Coming to the  third question I will answer in the below question  in some time as the thread is very long and it gets confused if some one references this.

https://developer.salesforce.com/forums?id=9062I000000UiXo


Thanks,
 
PkPk
Hello to you,

Thank you very much, you are really helpful and you are accurate, may God bless you.

I congratulate you and thank you for performing the amazing action and also for the understandable explanations.

I am now by the way to the second solution and will look at it.

Thank you very much again.