Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Canvas App - Dataverse Patch Record Create Error: {Attachments}: Field 'Id' is required.

Any DV/CDS entity that has Notes enabled will fail to create records using a data set from a collection with the error  {Attachments}: Field 'Id' is required.  If Notes are not enabled, it works.   If someone (e.g. customer) enables Notes on the entity you are using, after your Canvas app is installed, your app is now broken.

The only way to create records is to write a Patch command that specifies EVERY field you want.  Doing that way makes the process painfully slow to create new records. It takes just under 30 PAINFUL minutes to create 300 individual records across six entities in a Canvas App. 

Here is the sample code using the Account entity.  I am trying to copy an existing record, change the account name and then create a new account record.


//get an account record(s)
ClearCollect(account_col, Filter(Accounts, name = "Adventure Works (sample)") );

//Remove server generated data fields to prevent server errors

//RANT: Why doesn't the server just ignore fields it is creating data for and just show a warning instead of failure? 
ClearCollect(accountafterdrop_col, DropColumns(account_col,

// rename/update account record(s) to be copied/created
UpdateIf(accountafterdrop_col, true, { name: "Test Account Created From Patch" } )

// create new account record(s)
ForAll(accountafterdrop_col As NewAccount,
Patch(Accounts, Defaults(Accounts) , NewAccount)

Patch Create Fail Error: {Attachments}: Field 'Id' is required.

Also tried:  Patch(Accounts, accountafterdrop_col);
It fails with the same error too.

What modification is required to the collection "accountafterdrop_col" to make the Patch statements above work?  Or any other ideas to fix this issue?







Hi Artk, 


I was looking and we will need more info. Our recommendation will be open a support ticket in order we can analyze the issue and provide you a solution.





Create a new canvas app using the connector "Current Environment" and connect it to a Dynamics 365 Sales environment that has the sample data installed (or use another account record).    Add four buttons, create, drop, rename, patch.   Add my code bits to the buttons, you can step through the process.  Then patch will fail as I have indicated.


I didn't get a response here so I also posted it here.  You can see other steps we have tried to resolve this.




Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Users online (75,252)