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
shaik imran bashashaik imran basha 

Visual Flow Lookup

Hi ,

I am new to Visual workflow i create a javascript button in contact page which on click redirects to a flow which should dynamically pull that contact information from contact page and display in the visual flow  the fields which i want to display is contact name,email id, account name can someone help on this issue
VineetKumarVineetKumar
you need to include your flow in a page, and pass the contact Id in the URL (the url that you have configured for the flow).
Take that value in a variable and run your logic to set the default value in the variable while you are setting up the flows.
shaik imran bashashaik imran basha
This is the URL which i gave in the button now how do i call this in record lookup?

https://cs45.salesforce.com/flow/Test_Contact_Name?contactid={!Contact.Id}  so that it can dynamically pull values
VineetKumarVineetKumar
Create a variable with the same name as the parameter name in url, contactid in this case.
The variable that you want to set must have its Input/Output Type set to allow input access.

For testing you can create an TextBox field on the landing screen and bind the defalut value to {!contactid}.
Then while setting up the record lookup, you can refer this field at multiple place, in your filter condition (try typing the name in the value, if searching is getting cumbersome)

Let me know if this helps.
shaik imran bashashaik imran basha
was able to pull id but not able to pull the rest fields like contact name,email id
VineetKumarVineetKumar
Ok, now you need to create a sObject variable as (input/output type), say contactDetails.
Drag the record lookup from the pallete onto the screen, and setup the lookup object as contact
and select fiters as : Id EQUALS contactid
And then under the assign the record's field to variable to reference them in your flow section
Then start mapping the fields of the contact to the sObject's field.

Going forward you can refer the sObject variable to get the required details.

Let me know if that helped and do mark my answer as the best answer if it helped you.