cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Mick282
Level: Powered On

CDS (Current Environment) Get Record Select Query function doesn't work for Lookup fields

Hi all,

 

So I'm using the new Common Data Service (current environment) connection and using the Get record step to retrieve a single opportunity from Dynamics. This is all fine and I've managed to retrieve the record.

 

Now I want to use the "Select Query" function to limit the amount of fields returned in the Get Record step as I literally only need 2 field values from the opportunity. Unfortunately the two fields I need are lookups and specifically the out of the box account and contact lookups on the opps.

 

image.png

The problem is that when it's returned I'm getting null values for both contact and account lookup values. If I remove the Select Query then it works fine but it also retrieves every field value against the opp record. Any help would be greatly appreciated.

 

Edit:

 

This is what I'm getting from the output:

image.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: CDS (Current Environment) Get Record Select Query function doesn't work for Lookup fields

 

Hi @Mick282 ,

 

If it is a lookup column, then it stores the value of the record id in the current entity. If you want to get the specific value of the column, you still need to use this id to get the record in the corresponding lookup table. 

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: CDS (Current Environment) Get Record Select Query function doesn't work for Lookup fields

 

Hi @Mick282 ,

 

If it is a lookup column, then it stores the value of the record id in the current entity. If you want to get the specific value of the column, you still need to use this id to get the record in the corresponding lookup table. 

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

duncant
Level: Powered On

Re: CDS (Current Environment) Get Record Select Query function doesn't work for Lookup fields

how would you about doing this?

Mick282
Level: Powered On

Re: CDS (Current Environment) Get Record Select Query function doesn't work for Lookup fields

Hi @duncant 

 

Basically the select function for lookups is useless as all it does is returns a endpoint which returns the lookup record field values in JSON format and then you'll have to parse the JSON in another step anyway. I'd say it's probably easier just to use a Get Record step if you need to retrieve a field value from a lookup.

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,361)