Quick Tip to Fetch Option-Set Label & Lookup Name in a Power-Automate Flow




Quick Tip to Fetch Option-Set Label & Lookup Name in a Power-Automate Flow

DESCRIPTION

The Option-Set (Choice) and Lookup fields in Microsoft Dynamics CRM are special. The Option-Sets are essentially a combination of Integer Values and Labels, whereas the lookups are GUIDs plus the name of the parent record. In this blog, we will learn how we can fetch option-set labels and lookup names with simple OData expressions in MS Power-Automates (Cloud Flows).

For instance – A D365 CE case record as a field called Origin, which is an Option-Set. The Customer field is a lookup to account or contact entity.

In this blog, we aim to build a Cloud Flow to retrieve Case Origin labels & Customer names using OData expressions and store them in variables.

STEPS

  1. We open our D365 CE Solution and create a new Cloud Flow titled “Case – Get Origin and Customer”.
  2. The trigger for this flow would be to create a new Case.

3. We add the next action Get a row by ID to fetch all the properties of the newly created case.

4. We then create a new string variable CaseOrigin which is supposed to hold the label for the Case Origin Option Set.

We initialize its value with [OData format] –

@{outputs('Get_a_row_by_ID')?['body/caseorigincode@OData.Community.Display.V1.FormattedValue']}

5. We create one more string variable called CaseCustomer which will hold the customer’s (account/contact) name.

We initialize its value with [OData format] – 

@{outputs('Get_a_row_by_ID')?['body/_customerid_value@OData.Community.Display.V1.FormattedValue']}

6.    Finally, we save these changes in the Flow.


UNIT-TESTING
I.    We create a new Case in D365 CE to trigger the Power-Automate.

ii. We confirm that the Power-Automate has triggered, the Case Origin label and Customer name are correctly saved the variables.

Case Origin Label

Customer Name

CONCLUSION

Hence, we learned how we can make use of OData expression to fetch an Option-Set label and a lookup name in a Power-Automate (Flow). This saves us a great deal of time and effort.

That’s it from Aegis in this blog, see you in our next blog



Author Biography.

James Warner
James Warner

James Warner is a Business Analyst / Business Intelligence Analyst as well as experienced programming and Software Developer with Excellent knowledge on Hadoop/Big data analysis, testing and deployment of software systems at NexSoftSys

Join Our Newsletter.

Subscribe to CrowdforThink newsletter to get daily update directly deliver into your inbox.

CrowdforJobs is an advanced hiring platform based on artificial intelligence, enabling recruiters to hire top talent effortlessly.

CrowdforJobs

CrowdforApps brings to you the well researched list of the most successful and finest App development companies, Web software developers.

CrowdforApps

CrowdforGeeks is where lifelong learners come to learn the skills they need, to land the jobs they want, to build the lives they deserve.

CrowdforGeeks

CrowdforThink is a leading Indian media and information platform, known for its end-to-end coverage of the Indian startup ecosystem.

CrowdforThink
CFT

News & Blogs

dd88c77df465b3bea238268ff2494998.jpeg

How to Write Programs Without Bugs

While fostering a huge program, inescapable a few bugs will come up. You most likely definitely k...

b5f078b4e69a70fd2893c8dd9f9accce.png

The Complete React Developer Salary Guide for 2022

Data from a Statista study shows that React JS is the most in-demand web framework in 2022, with ...

f5bbab7dbb6cebb2336e15307239ae3b.jpeg

What Is Agile Testing? Life Cycle, Benefits, an...

Here, we'll investigate what is Agile trying, the periods of the dexterous testing life cycle...

Top Authors

Lamia Rochdi is the Marketing Manager at Bell Flavors & Fragrances EMEA. A successful family-...

Lamia Rochdi

Zakariya has recently joined the PakWheels team as a Content Marketing Executive, shortly after g...

Zakariya Usman

Overall 3+ years of experience as a Full Stack Developer with a demonstrated history of working i...

Lokesh Gupta

I’m Mertin Wilson a technician in a camera company and certified expert of different P...

Mertin Wilson
CFT

Our Client Says

WhatsApp Chat with Our Support Team