+ Start a Discussion
Kelly RoseKelly Rose 

Flow Variables

I am looking for create a flow resource that pulls in the Comments field from the task object. Do I create this variable from the SObject variable? How can I isolate 'Comments'?

I have a similar scenario where I also want to create a variable for the Account ID of the Account 'Related to' on the task object.

The task will have the custom button that launches the flow.

Kelly RoseKelly Rose
It was able to create the SObject variables, but when I flow is launched via the custom button, I want the text in the variable to be pre-populated with the text from the task description. I assumed this was the input/output choice, but I could be wrong.

Also, why does the flow look visually different from the rest of salesforce? Is there design work that needs to be part of the flow development?

Sorry for all of the questions, I'm new to Flows entirely.
Hi Kelly,

Can you please describe where the user is clicking the button that has the flow embedded in it?

You can pass variables from the current record you are on from the VisualForce page that you have this button launching. You need to create variables in your Flow and then pass them into the flow via the VisualForce page. Here is an example of a VisualForce page with a Flow embedded that is passing the Id of the current record into the flow.
<apex:page standardController="Task" Sidebar="True" showHeader="True" standardStylesheets="True">
   <flow:interview name="PlaceOrder" finishLocation="/{!SBQQ__Quote__c.Id}">
        <apex:param name="var_MyTask"      value="{!Task.Id}"/>

You would also need to update the flow name and the finishLocations in that code to where you want it to finish and what the name of your Flow is.
Kelly RoseKelly Rose
Hi there -- thank you for the quick response! The custom button is on the task object page layout. I would prefer that the finish location would be the new record that my flow is set to create. Status__c would be the object of that new record.