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
Ed055Ed055 

flow triggers and work flow

I'm new to flow in Salesforce. I'm trying to update   "Type" picklist value in task object based on other picklist value field(product) .    
Product picklist has value for example A,B & C . Product picklist cannot be edited and is set by other process.
If product field is set to A  during task creation , I want to set the "Type" picklist value to "Email"
If product field is set to B  during task creation , I want to set the "Type" picklist value to "Call"

I created a flow with 2 "record updates" to update "Type" field based on product. The first record update will fire if product value is A and second record update will fire if product value is B. I created a workflow and added flow trigger in the workflow action. This workflow is set to fire only when record is created.

I have not tested it. Is this the right approach and correct  way to create flow?  also, will only the record that was created will be updated by flow or ALL task records will be updated. I wanted to be sure before i activate it.   Thanks for help.
User-added image

 
JayOlayJayOlay
Hi Ed055 -- Typically, in this type of flow, you would start with a "Decision" node with 2 outcomes: "Product Value is A" and "Product Value is B". Then, link each outcome from the Decision node into the appropriate Record Update shape which you described above.
Ed055Ed055
Thanks Julien for your suggestion. Below is what I have done so far ...
1. Created a "producttype" variable in flow
2. Created Decision node with 2 outcomes . One outcome compares producttype = A and other compares producttype=B
3. Linked the decision notes to point to correct Record Update. No filters on 2 record updates
4. Created a workflow flow trigger to fire only when record is created. Set  filter product = A or product = B.
Also,  setting flow variable productype with value "Product" from task object

Is this correct ?
Also, please let me know if this flow will update only the new task record that was created?  How does flow get the task ID ?