Activity Forums Salesforce® Discussions How can we find my record ID in flow in Salesforce ?

  • Shweta

    Member
    August 5, 2020 at 5:12 pm

    We can get record id by following these steps:
    1. Go to Setup -> Enter flow in Quick find box -> select Flows.
    2. Click on the New Flow button.
    3. In the left pane toolbox, Click manager -> click on the new resource -> in the resource type select variable from the drop-down menu.
    4. In the new resource variable box -> enter these values: API Name:recordId, Data type: Text, select available for input -> click on done.
    5. In the toolbox element tab, click on the screen and drag it onto your canvas. In screen properties, give the flow component a label and API name. In the screen component section, drag the display text component into the screen element. give it an API name and in text block section, type: The record ID is: {!recordId} -> Click on done.
    6. Connect the Start element to the Screen element-> Click Save.
    7. Go to setup -> Object Manager -> Select Opportunity -> select Buttons, links and actions -> click on new action button -> enter the information and click on save.
    8. Add action button on page layout
    9. Your show ID button visible. Once you click it, it shows the ID of the record

    1. Alex

      Member
      September 1, 2021 at 12:22 pm
    2. Alex

      Member
      September 1, 2021 at 12:26 pm

      Thank you very much, I was looking for this information for hours, I repeat thank you very much Shweta.

    3. moshe

      Member
      September 1, 2021 at 5:01 pm

      Best answer

    4. Neha

      Member
      September 3, 2021 at 5:16 am

      1Create A Variable In Your Flow To Store The Record Id

      Let's create a variable called recordId, we will then assign the Id of the current record to this variable so it can be used in our flow.

      You can also create other variables in the flow and pass values to them from a lightning page as well if you need to

      Few things here.

      Created a variable with the data type of textNamed it recordIdSelected Available for input - this allows us to reference the variable when editing a lightning page.

      By selecting the option Available for input you can see this variable now when you view the flow from a lightning page.

       

      2. Edit The Lightning Page That The Flow Is On

      When adding the flow to the lightning page we can now see the recordId variable available. Here we can select the option to Pass record ID into this variable.

      Now the variable recordId in the flow has the current records Id value and can be used as needed in the flow.

       

       

      • This reply was modified 3 years, 3 months ago by  Neha Dongre.
      • This reply was modified 2 years, 9 months ago by  Forcetalks.
      • This reply was modified 2 years, 9 months ago by  Forcetalks.

    Log In to reply.

    Popular Salesforce Blogs