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
Alesia DvorkinaAlesia Dvorkina 

Is Lookup in Flow possible? Or have to use Visualforce?

Hi everyone, 
I hope someone can help. 
I am not a developer, rather a point-click admin. A little background: In my org we have a custom button that creates a Case from a custom object "Sales Order". This button executes JavaScript. And it SOMETIMES populates a Sales Order number with a coma in a lookup field on a Case, which is not recognized and the error is displayed. This is part of that code:
....location.href='/500/e?retURL=/{!Sales_Order__c.Id}&RecordType=012C0000000QCAN&CF00NC0000005DY09={!Sales_Order__c.Order_Number__c}....
I decided to try to re-write this button with Flow. The idea is to 1) display a message to a user, 2) Lookup to Account from Sales Order; 3) Get a list of Contacts from this Account; 4) Display this list to users and let them choose an appropriate contact; 5) Create a new Case that is related to this SO (custom relationship), to the same Account, and to the chosen Contact. I can't figure out how to do this with the Flow? Do I have to use Visualforce for this? Can someone give me a little direction on how to do that? Thank you in advance!!!
Best Answer chosen by Alesia Dvorkina
Alesia DvorkinaAlesia Dvorkina
By the way - here is the solution, if someone with the same issue is reading this post :)
Use Dynamic Choices to create a lookup within a Flow.
Steps: create a Screen element, add a picklist or radio buttons field. Then in Choice Settings select Dynamic Choice. Voila!
 

All Answers

Mathew Andresen 5Mathew Andresen 5
Hi,

I don't use flow's that much, but I do believe this is possible.  Have you worked through the force.com workbook, I think the processes it covers should be roughly transferable to what you are trying to do.

https://developer.salesforce.com/docs/atlas.en-us.workbook.meta/workbook/flow_0_intro.htm
 
Alesia DvorkinaAlesia Dvorkina
Thank you Mathew, I have covered this material before and went back to review the Flow section specifically. But there's no  specifics about this process. 
Alesia DvorkinaAlesia Dvorkina
By the way - here is the solution, if someone with the same issue is reading this post :)
Use Dynamic Choices to create a lookup within a Flow.
Steps: create a Screen element, add a picklist or radio buttons field. Then in Choice Settings select Dynamic Choice. Voila!
 
This was selected as the best answer