Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

How to get lookup name instead of id in send an email action in Ms Flow

Posted on by 379

Hi, 

I have a custom entity Lease. This lease entity contains the many lookups like user's and account.

I have created  Ms flow in which I am sending an email and I want to get the all lookup's name in the email body but as flow is triggered I am just getting the lookup's Id's.

I am using this expression in which I got the Id:- triggerOutputs()?['body/_cyno_primaryclientcontact_value'] 

and If I use:- triggerOutputs()?['body/_cyno_primaryclientcontact_value@OData.Community.Display.V1.FormattedValue'] then got nothing.

  • Himanshu Kamboj Profile Picture
    Himanshu Kamboj 379 on at
    RE: How to get lookup name instead of id in send an email action in Ms Flow

    Thanks Leah!!

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get lookup name instead of id in send an email action in Ms Flow

    Hi Himanshu,

    Maybe you can add one action ‘Get a row by ID’ action before get lookup field name.

    For example, I test I contact entity, which have one lookup field named ‘Account name’ related to account entity.

    1.Firstly, I tested it as your example, then I got the same results with you.

    triggerOutputs()?['body/_parentcustomerid_value'] can get id.

     pastedimage1620031854100v1.png

    triggerOutputs()?['body/_parentcustomerid_value_parentcustomerid_value@OData.Community.Display.V1.FormattedValue'] get nothing

    pastedimage1620031870499v2.png

    2.Then i add one  action ‘Get a row by ID’  with guid from the trigger, and use 

    outputs('Get_a_row_by_ID')?['body/_parentcustomerid_value@OData.Community.Display.V1.FormattedValue']
    pastedimage1620032103986v3.png
    Test Result:
    pastedimage1620032155400v4.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans