I have a parent object of Project and a child object of Project Notes. I want to create a Project Note using a screen element inside a flow. I will have a button on the Project record to initiate the flow and bring up the input screen.

The Project Note record has three fields -

  1. Project Note Name (Required)
  2. Project (Required and is the master/detail field to select the parent record).
  3. Note (not required)

Right now I have three elements in my flow -

  1. Screen - Field for Action Taken that will populate a text field on the Project Note record.

  2. Record Lookup - enter image description here

  3. My Record Create element looks like this -

enter image description here

When I run the flow, I get this error message -

RECORD QUERY: Project_Name Find one Project__c record where: Id Equals {!var_ProjectID} (null) Result Failed to find record.

RECORD CREATE: Create_Note Create one Project_Note__c record where: Name = {!Flow.CurrentDate} (October 10, 2016) Note__c = {!Action_Taken} (Test) Project__c = {!ProjectName} (null) Result Failed to create record.

I take this to mean there is a problem with my Record Lookup element but have not been able to figure out how to fix it. The Project Name is not being passed into my ProjectName variable.

I have looked all over to try and figure this out but am stumped. Any help is appreciated, even if you just point me in the right direction.


As project__c field on note is the relationship to the parent project, you need to use the project ID in the record create element. You are using the project name.

So you don't actually need the record lookup, unless you are using project name elsewhere in the flow, since you are passing the project ID in via the URL. Just make sure that the var_projectID is not set to private.

Looking at the error again, it's possible that the issue is just due to var_projectId being set to private, as it's set to null in the flow error message. However even if that is fixed I still don't think passing name to a relationship field would work.

  • How do I pass the Project ID via the URL? – David Glenn Oct 13 '16 at 5:00
  • I assumed that was how you were setting varProjectId. You can do so as documented here help.salesforce.com/… – gorav Oct 13 '16 at 10:53
  • Thank you very much for your help. It is working like I want it now. Passing the value into the variable with the URL was the piece I didn't understand. – David Glenn Oct 13 '16 at 21:02
  • Great. So passing name to the id field is working? I've seen that work on URL hacks on classic but never tried in flow. Note that if there are two project records w the same name that might cause an issue. – gorav Oct 13 '16 at 21:04
  • I pass the Project__c.id to the variable which is named varProjectName. /flow/Record_Project_Action?varProjectName={!Project__c.Id}. I use the varProjectName to assign the Name field on the Project_note__c object under the Record Create element. – David Glenn Oct 15 '16 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.