I've created a Flow in Salesforce. The goal is to use an existing global action to create a case then allow the user to add an attachment to the case. Here's a picture of what I've got:

enter image description here

The issue I'm running into is that in order to upload an attachment you need to pass through the Related Record ID.

enter image description here

The global action should be creating a record and the recordId which I would then need to assign to a variable that I can reference in my flow. However, I'm not able to find how to assign the recordId created by the global action to a variable.

I'm referencing this document which shows how it's done using the stand Create Record palette tool - https://trailhead.salesforce.com/modules/business_process_automation/units/flow

enter image description here

Any suggestings would be greatly appreciated!



1 Answer 1


You need to assign the record ID to the accountID variable documented in your screenshots. It doesn't look like you actually create the case from within the flow, so you need to pass it in.

Unless there's something preventing you from doing so, it'd probably be simpler just to create the case from within the flow and capture the ID there rather than trying to piggy back off another process.

Hope this helps,


  • Thanks for your help, Sean! I decided to just to create the case from within the flow and capture the ID there like you suggested.
    – Kevin
    May 23, 2018 at 16:15
  • Hopefully that's working out for you. I work in visual flow/PB quite a bit so if you have any questions feel free to reach out directly. May 24, 2018 at 18:19
  • Also if you don't mind please mark this answer as best/useful May 24, 2018 at 18:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .