I'm working on a very simple screen flow and I need your help...

I have a contract object that has a tutor field, which refers to a contact record. On my contact page, I want my screen flow to include a field that sums up the number of open contracts where that contact is registered as a tutor.

enter image description here

Right now, the field should show 1, but it shows all the open contracts across the db. The field that says "Nombre d'apprenants suivis actuellement: 353,00" enter image description here

In the get record, I'm trying to filter the contract where the id in the tutor field matches the id of the current contact record I'm viewing (like mentioned here), to no avail.

I have tried matching the contact id with the one in the field (like mentioned here), to no avail

Can you help me figure it out? Thank you!

  • Can you confirm what is that get records filtering? Mar 15 at 6:26
  • @SaiPraveenKakkirala thank you for taking a look, I've edited my question hoping to make it better.
    – Sebbie
    Mar 15 at 6:41
  • Can you please help me on the filter condition you used in get records because I am not familiar with the language you are using in the flow. I just need translation for that get records filter. How are you passing current recordId to the flow? Mar 15 at 6:58
  • @SaiPraveenKakkirala of course, the "select_tuteur_c" is a lookup field, the operator is "equals" and the value is "$Flow.CurrentRecord" like here help.salesforce.com/s/…. Thanks
    – Sebbie
    Mar 15 at 7:09

1 Answer 1


I guess the issue is in getrecord element in the flow. In the place of $Flow.CurrentRecord can you try creating a variable of name recordId of type Text and check Available for Input as shown below.

enter image description here

Now edit your lightning page under your flow and check the checkbox pass recordId into this variable give the input as shown below.

enter image description here

You can refer the example for the same.

  • Should the input variable not be called recordId (lower case first letter)? Also, this variable can be the whole record or the ID only as desired.
    – Phil W
    Mar 15 at 7:27
  • @PhilW, Yes it can be recordId. We are just passing the Id from the record as the variable is of type Text and we just need Id of the Record I guess. So added it as Text. Mar 15 at 7:33
  • The documentation says to use recordId. Are you saying this is case insensitive?
    – Phil W
    Mar 15 at 7:48
  • In this scenario We can use anything because we are passing the variable to the flow from the lightning page as shown above. I tried using both and both worked as expected. Mar 15 at 7:50
  • Thank you! You taught me something and saved my day! Worked perfectly of course :D
    – Sebbie
    Mar 15 at 8:09

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.