# Failed to insert record into staging table. The keys of the record are DEFINITIONGROUP, EXECUTIONID, PARTITION, RECORDID

**URL:** <https://www.dynamicsuser.net/t/failed-to-insert-record-into-staging-table-the-keys-of-the-record-are-definitiongroup-executionid-partition-recordid/77546>\
**Category:** General discussions\
**Tags:** d365fo\
**Created:** [January 4, 2023, 11:52am UTC](https://www.dynamicsuser.net/t/failed-to-insert-record-into-staging-table-the-keys-of-the-record-are-definitiongroup-executionid-partition-recordid/77546 "2023-01-04T11:52:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amineneb](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@amineneb](https://www.dynamicsuser.net/u/amineneb)\
**Post date:** [January 4, 2023, 11:52am UTC](https://www.dynamicsuser.net/t/failed-to-insert-record-into-staging-table-the-keys-of-the-record-are-definitiongroup-executionid-partition-recordid/77546/1 "2023-01-04T11:52:44Z")

</div>

Hello everyone, I hope you are fine.

I want to import File " Sales price agreement" in data management, So I get this error

“Failed to insert record into staging table. The keys of the record are DEFINITIONGROUP, EXECUTIONID, PARTITION, RECORDID. Duplicate records must be removed from the file prior to import.-The duplicate key value is (5637144576, sales price agrem import, sales price agrem import-2023-01-04T02:58:54-33403ECEC3654302B2CB7412E42A824C, 0)  
‘0’ ‘Sales price agreements’ record(s) inserted in staging”

So, I tried to auto increment the “RECORDED ID” but doesn’t work. it’s send me a message

"Non-editable fields were not allowed to mark as Auto default or Auto-generated "

 ![0001](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/a/a1ebad113c18b41bb7dbd490e67ab861bc97c754.png)

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [January 4, 2023, 12:03pm UTC](https://www.dynamicsuser.net/t/failed-to-insert-record-into-staging-table-the-keys-of-the-record-are-definitiongroup-executionid-partition-recordid/77546/2 "2023-01-04T12:03:33Z")

</div>

SalesPriceAgreementEntity should be read-only, IMHO. Trying to import records directly to PriceDiscTable is logically wrong and setting RecId from outside isn’t possible.

---

<div class="post-metadata">

**Author:** ![amineneb](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@amineneb](https://www.dynamicsuser.net/u/amineneb)\
**Post date:** [January 4, 2023, 12:09pm UTC](https://www.dynamicsuser.net/t/failed-to-insert-record-into-staging-table-the-keys-of-the-record-are-definitiongroup-executionid-partition-recordid/77546/3 "2023-01-04T12:09:59Z")

</div>

> [@MartinDrab](#):
>
> to

Thanks I will try it

---

<div class="post-metadata">

**Author:** ![amineneb](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@amineneb](https://www.dynamicsuser.net/u/amineneb)\
**Post date:** [January 4, 2023, 12:18pm UTC](https://www.dynamicsuser.net/t/failed-to-insert-record-into-staging-table-the-keys-of-the-record-are-definitiongroup-executionid-partition-recordid/77546/4 "2023-01-04T12:18:57Z")

</div>

I didn’t find “PriceDiscTable” in the Export DATA MANAGEMENT

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [January 4, 2023, 12:29pm UTC](https://www.dynamicsuser.net/t/failed-to-insert-record-into-staging-table-the-keys-of-the-record-are-definitiongroup-executionid-partition-recordid/77546/5 "2023-01-04T12:29:03Z")

</div>

I’m not going to duplicate all my replies at two places. Let’s continue the discussion [in the other thread only](https://community.dynamics.com/365/supply-chain-management/f/dynamics-365-supply-chain-management-forum/475530/failed-to-insert-record-into-staging-table-the-keys-of-the-record-are-definitiongroup-executionid-partition-recordid-duplicate-records-must-be-removed-from-the-file-prior-to-import--the-duplicate-key-value-is-5637144576-sales).
