YouTube Icon

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.

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

Our mission is "Har Koi Dekhe Video, Har Ghar Dekhe Video, Ghar Ghar Dekhe Video" so we Provide videos related to Tutorials, Travel, Technology, Wedding, Cooking, Dance, Festivals, Celebration.

Apna Video Wala
CFT

News & Blogs

4e001a829dec0246019fc8cfbef37760.png

How to detect network connection is Online/Offl...

We all might be familiar with the JavaScript way of checking Online/ Offline status. But in the c...

f744dbf3ab03eaaa58fd3e6dac2d0169.png

How to Get User Country Name, Browser, OS Name,...

Using PHP get stoner details IP address country, device, cybersurfer, operating system  &nb...

ff7f9eca4d1a0d29656644f11b806865.png

How to Drag And Drop Data Between Two Tables In...

Introduction  occasionally you need to drag and drop data from one table to another table...

Top Authors

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

Lamia Rochdi

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

Mertin Wilson

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

Zakariya Usman

Pankaj Singh is a Senior Digital Marketing Consultant with more than 2 years of experience in SEO...

Pankaj Singh
CFT

Our Client Says

WhatsApp Chat with Our Support Team