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
Cali FerrerCali Ferrer 

Automate picklist depending on set of picklist values using flow

Hi,

I have a tricky requirement here where in on 1 case, there are multiple set of orders.

On Case, I have an custom picklist field named "PO_status__c" and on Order I have an custom picklist field name "SO_status__c".

"PO_status__c" picklist consist of;
1. New
2. Open
3. Closed

"SO_status__c" picklist consist of;
1. New
2. Open
3. Order Processing
4. Booked
5. Cancelled

Criteria is, PO Status should auto-update depending on the related SO Status:

1. PO status should be "New" if,
- All SO Status are "New"
 
2. PO status should be "Open" if,
All SO Status are "Order Processing"
All SO Status is are "Booked"
Combination of SO status with have
"New",
"Order Processing",
"Booked"
 
3. PO status should be "Closed" if, 
All SO Status are "Cancelled"

May I know what is the step by step order of the needed elements & element conditions on flow to achieve this requirement?

TYIA!
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you confirm on relation between order and Case. Which is Parent object and which is child object so I can suggest you the flow for the same.

Thanks
 
Cali FerrerCali Ferrer
Hi Sai,

Apologies for the late response. Parent object is Case and child object is Order. Process is on 1 Case, it can have multiple Orders. 

So for example I have 1 case and on that case there are 3 related Orders.

>>> Case Number: 001
related Orders:
Order 333: SO status is "New"
Order 222: SO status is "Order Processing",
Order 111: SO status is "Booked"

so the PO status on Case must automatically changed (thru flow) to "Open" since the related Order SO statuses are consist of "New", "Order Processing" and "Booked". (Combination status criteria are listed above on my post)

Looking forward for your response then.

TYIA!