+ Start a Discussion
Andy Kallio 7Andy Kallio 7 

Flow fast lookup not finding record that soql can find

Hello
I am working on a flow and one of the things it needs to do is query PriceBookEntry. For some reason the fast lookup is not finding any records, but when I test the same query with soql executed on workbench the record is found. I'm a bit stumped on what to do next. So hopfully someone out there has some ideas. 

Here is excerpt from the debug email that shows what the fast lookup is doing:
FAST LOOKUP: Get_Standard_PBE_PP
Find all PricebookEntry records where:
Platform__c Equals {!Pureprofile} (Pureprofile)
Pricebook2Id Equals {!varQuote.Pricebook2Id} (01s90000004YFPxAAO)
CurrencyIsoCode Equals {!varQuote.CurrencyIsoCode} (AUD)
Incidence_Rate__c Equals {!formulaIncidenceRate} (10.00)
Length_of_Interview__c Equals {!Length_of_Interview2} (20)
Assign those records to {!sovPBEM}.
Save these field values in the variable: Id
Result
Failed to find records.

And here is the soql that actually finds the record
SELECT 
    Id, 
    name, 
    currencyisocode 
FROM PricebookEntry 
where 
    Length_of_Interview__c = 20 and 
    Incidence_Rate__c = 10.00 and 
    Platform__c = 'Pureprofile' and 
    Pricebook2id = '01s90000004YFPxAAO' and 
    CurrencyIsoCode = 'AUD'

 
Adam ErskineAdam Erskine
I'm having the same issue and I'm only using the Salesforce ID as a parameter.  
Allen MoyAllen Moy
We are having a similar problem. A flow that worked consistently since 2017 is now throwing errors saying that a record cannot be found. However, we can find the record with Aposona or a SOQL query. I opened a case with Salesforce but was told they are unable to assist with any errors involving flows. 
Dan RamirezDan Ramirez
Allen, were you able to find a solution for this? I'm running into the same issue and got the same answer when I reached out to SF.
Andy Kallio 7Andy Kallio 7
Hi All. I just had a look at this. I should've posted what I found way back in sept 2017 because now it's hard to say how exactly I fixed it. All that I can say for sure is that there was an issue with the variable called Length_of_Interview2, but I don't know anymore what exactly was wrong with it. And as you can see from the original post above the variable looked right with a value of 20, which is what my soql query had. So, all I can suggest is to double check the vars you're searching with...perhaps it was a Text var when what was needed was a Number var.  Good luck.