Custom Data Between PurchTable Form and CreatePurchTable Form

Hello everyone. This is my first post so I apologize if I violate any community standards. I’ll get used to it as I spend more time on here.

Anyways, I am having an issue. I am still new to AX and have a spec to complete. In this spec, I must join the PurchTable to a custom table holding our company specific data. I’ve had no issues doing so. The problem is I also must add these fields to the CreatePurchTable form so they can be edited by the end user during PO creation. I was able to join my custom table to the data source in the CreatePurchTable form, but when testing, I go to save and an error is thrown saying the record is already in my custom table.

Any ideas as to why this is being thrown during creation? If so any clues how to fix it?

Thanks

Hi, Dont fret, theres always a first time. If you are using a unique index in your custom table, check there is no duplicate entry.

Thanks Aman, looks like AllowDuplicates is set to “No”. Same issue is occurring though. I’ve overridden the “write” and “validateWrite” methods of my custom table on both forms to set that primary key. It’s just weird that the CreatePurchTable form would have a problem inserting a new record. Could PurchTable be causing the issue when the “Create Purchase Order” button is pressed?

Any other ideas regarding this topic? I’ve still had no luck.