cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Operation return invalid status code 'Bad Request' : Microsoft.Powerplatform.Cds.Client -Version 0.2.14-Alpha

Our Requirement:
We have Azure Linux server resource group. So we need to create azure function in .net core 3.1.

So, we got the following package which provide supports in .net core azure function
Microsoft.Powerplatform.Cds.Client -Version 0.2.14-Alpha

 

Let me include few details about our implementation:

1. We have used Dynamics connection string - ClientSecret Authentication types

2. Following things working fine with the above connection string.

 - Retrieve records from Entities - Working fine

 - Insert/Update operation in Entity which doesn't contain EntityReference type (Lookup) - Working fine.

3. When we perform Insert/update operation in Entity which contains EntityReference type (Lookup), it gives error
Operation return invalid status code 'Bad Request'

 

Let me attach some code which we implemented in console application:

 

var service = new CdsServiceClient(connectionString);
 if (service.IsReady)
 {
   Entity account = GetAccountEntity(service);
   Entity coupon = GetCouponEntity(service);


   Entity couponPerCustomer = new Entity("couponpercustomer");
   couponPerCustomer["couponid"] = coupon.ToEntityReference();
   couponPerCustomer["customerid"] = account.ToEntityReference();
   service.Create(couponPerCustomer);
 }

 

When we run above code it gives error in "service.Create(couponPerCustomer)"
Error: Operation return invalid status code 'Bad Request'
Error.png

4 REPLIES 4
Michaelfp
Advocate II
Advocate II

Please post your problem here in the official post of this .net core package. The product team could give more support.

 

https://powerusers.microsoft.com/t5/Power-Apps-Pro-Dev-ISV/Announcing-the-net-Core-SDK-for-Common-Da...

 

 

Anonymous
Not applicable

@Michaelfp 
Thanks for the info.
I have posted my issue in given link.
Still, I am not getting any update from production team.

I will update you once I will get any solution from production team.
Thanks

 

 

If @Michaelfp or yourself had read the first post on that thread - you would have seen the place to report the bug is on github (where the project is being managed) at https://github.com/microsoft/PowerPlatform-CdsServiceClient

 

I'm surprised the issue hasn't already been reported there but I know responses on github are far more likely to be noticed.

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

@ben-thompson i didn't notice that had an update about the issues. thanks for the information

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (2,378)