web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch function to crea...
Power Apps
Answered

Patch function to create Dynamics 365 record throws an error - "An unkown error occurred."

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a PowerApp to create a new record in Dynamics 365 custom entity.

My app has an Edit form with 2 input fields, and a button which executes Patch function to create the record.

 

The custom entity has only 2 mandatory fields  - Name and Owner.

When I run the app and click the button, there is no record created in Dynamics 365. 
I see the error "An unknown error occurred" as in the screenshot.

 

I tried using Errors function but there is no error returned.

 

Am I missing something in the Patch function? Any pointers appreciated.

Thank you!

 

CreateRecordError.png
Categories:
I have the same question (0)
  • Verified answer
    Akshatha Profile Picture
    Microsoft Employee on at

    I fixed this and it is working now. The text property of the Text Input control was missing in the Patch function. 

     

    Not Working - Patch(PowerAppData, Defaults(PowerAppData),{new_name:TextInput1,new_firstname:TextInput2})

    Working - Patch(PowerAppData, Defaults(PowerAppData),{new_name:TextInput1.Text,new_firstname:TextInput2.Text})

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 528

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard