Setting Lookup in a Flow CDS Connector: Classic vs. Current Environment connector | Power Automate Quick Tip

Both the CDS and CDS Current Environment connector are similar yet different in the way how they accept Lookup values set in their Update a record steps.

Here’s a quick tip!!

Scenario

Taking a simple example of setting Primary Contact Lookup on Account.

We’ll do the same thing using both the connectors mentioned below.

Common Data Service connector

Common Data Service (Current Environment) connector

Common Data Service Connector

Let’s start with using the classic Connector first –

  1. As mentioned in the Scenario above, let’s first try to use a class Common Data Service connector. Here’s how you identify the same.

  2. Now, whenever you have to set the Lookup value in the classic connector’s Update a record action, you can simply tag the Primary Key as is on the field in the connector step as shown below.


    And lookup can be tagged very easily.

Common Data Service (Current Environment) Connector

  1. Let’s do it with the new Common Data Service (Current Environment) connector. This is a much simpler way to tag a Lookup. Now, the new CDS Current Environment connector can be identified as below.

  2. In order to set Lookup, you’ll need to patch is in the below way
    pluralNameOfTheEntity([PrimaryKey])

  3. Here’s how my friend Linn Zaw Winn’s post explains in details of why we have to choose the plural name and exactly where you can get it from – http://linnzawwin.blogspot.com/2019/11/power-automate-how-to-set-lookup-field.html

Hope this was useful. Here are some more Power Automate / CDS posts which you might want to check out –

  1. Using outputs() function and JSON Parse to read data from missing dynamic value in a Flow | Power Automate
  2. Adaptive Cards for Outlook Actionable Messages using Power Automate | Power Platform
  3. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  4. Task Completion reminder using Flow Bot in Microsoft Teams | Power Automate
  5. Run As context in CDS (Current Environment) Flow Trigger | Power Automate
  6. BPF Flow Step as a Trigger in CDS (Current Environment) connector | Power Automate
  7. Accept HTTP Requests in a Flow and send Response back | Power Automate
  8. Call HTTP Request from a Canvas Power App using Flow and get back Response | Power Automate
  9. Setting Retry Policy for an HTTP request in a Flow | Power Automate
  10. Adaptive Cards for Outlook Actionable Messages using Power Automate | Power Platform

Thank you!!

Advertisement

2 thoughts on “Setting Lookup in a Flow CDS Connector: Classic vs. Current Environment connector | Power Automate Quick Tip

  1. Hi! Thanks for this. It’s the closest I’ve got to answering my problem, but it’s kind of the other way around. I need to filter a Lookup column (filter Opportunity Products by the Opportunity) and nothing I try (including opportunities(guid) ) seems to work. Any ideas?

    Thanks again.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.