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

Patch function to a CDS Lookup using the CDS connector

Hey,

 

Does anybody know the properties for setting a Lookup field in CDS using the Patch function? I have the records GUID (which is obviously type GUID), however the Lookup field expects a type 'Record'. I am trying to set an OpportunityID lookup and I need to know the properties expected for a record i.e. ID, Value etc etc). I cannot use a the Lookup function as I hit the delegation limit. Thanks in advance.

2 REPLIES 2
Community Support Team
Community Support Team

Re: Patch function to a CDS Lookup using the CDS connector

Hi @Jhetheringt92 ,

 

You are correct about the part that lookup column need to provide the actualy record. Please try to store the whole record in a variable, for example, call it V1, then patch like this:

Patch(
    'xxx',
    Defaults('xxx'),
    {
        ....
        'Lookup':V1
    }
)

You could also see if below threads could help:

https://powerusers.microsoft.com/t5/General-Discussion/Unable-to-set-the-lookup-field-value-using-Pa...

https://powerusers.microsoft.com/t5/General-Discussion/Patch-a-CDS-Lookup-column-within-PowerApps/m-...

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Jhetheringt92
Level: Powered On

Re: Patch function to a CDS Lookup using the CDS connector

Hi @v-monli-msft, thank you for the response. Unfortunately these examples won't work for me as I only know the ID of the record. I will not be able to do a lookup to the record as I will receive a delegation error as there are thousands of records against that entity.

 

The Patch function should accept just the ID, as it isn't realistic that you have the whole record. For now I have had to use Microsoft Flow as this allows me to create a record and set the value using only the ID, however I think this should be considered for a future release.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 116 members 4,593 guests
Please welcome our newest community members: