cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
lowprofiler Advocate I
Advocate I

Bad Request error trying to create Task in Dynamics 365

Hi,

 

I'm trying to create Task record in Dynamics 365 using PowerApps/Flow but just can't get it to work. The error message is not quite helpful:

error msg.jpg

 

My Flow:

Flow.jpg

 

Here's the screenshot of how a Task is added directly in CRM from a regarding record:
Task.jpg

 

Subject and Description are not a problem. I'm certain that Regarding and Regarding Type fields are okay as well, as I've done it similarly for creating a Note with these two fields for the same type of Regarding record. That leaves Owner field. After a few tests, I'm pretty sure that CRM is expecting the full name of the user instead of e.g. GUID, so I'm passing exactly that from the PowerApp as well. At the end I'm still getting the error. I'm pulling my hair out trying to think of other possible cause... Any thoughts/suggestions on what to look would be appreciated. Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Bad Request error trying to create Task in Dynamics 365

Hi @lowprofiler,

 

Could you please create a simple flow with the action “List records” to get the type of all the records in entity Tasks.

 

Some of the recoreds may need type of GUID, while others need type of name. I assume that some values that pass from PowerApps are not exactly what the records needed.

 

Please try with it on your side and feel free post back if you need more help.

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
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

2 REPLIES 2
Community Support
Community Support

Re: Bad Request error trying to create Task in Dynamics 365

Hi @lowprofiler,

 

Could you please create a simple flow with the action “List records” to get the type of all the records in entity Tasks.

 

Some of the recoreds may need type of GUID, while others need type of name. I assume that some values that pass from PowerApps are not exactly what the records needed.

 

Please try with it on your side and feel free post back if you need more help.

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
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

lowprofiler Advocate I
Advocate I

Re: Bad Request error trying to create Task in Dynamics 365

Hi @v-yamao-msft,

 

Thanks for your tip! I checked the values passed from PowerApps and it turned out Owner field should be GUID. (Previously I did try using GUID and it gave me an error saying it's expecting "," so I thought it's expecting "lastname, firstname" text.) Anyway, thanks very much for your quick reply and the great tip. (Always appreciate all the comments/advice from your team in the community!)

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,212)