
Microsoft Dynamics 365 Finance & Operations
Data Entities / OData Integration
EcoResReleasedProductDocumentAttachmentEntityReleasedProductDocumentAttachmentWe are unable to update (PATCH) document attachment fields such as Notes and AttachmentDescription on the ReleasedProductDocumentAttachments OData entity. CREATE (POST), READ (GET), and DELETE operations work successfully.
Create a document attachment on a Released Product using POST
POST {{server-url}}/data/ReleasedProductDocumentAttachments
Result: ✅ Success
Read the attachment using GET:
GET {{server-url}}/data/ReleasedProductDocumentAttachments?$filter=ItemNumber eq '100'
Result: ✅ Success
Attempt to update Notes using PATCH:
PATCH {{server-url}}/data/ReleasedProductDocumentAttachments(dataAreaId='Id',ItemNumber='100',DocumentAttachmentTypeCode='File',AttachmentDescription='test',AttachedDateTime=2026-02-20T06%3A20%3A53Z)
Body: { "Notes": "Updated note text" }
Header: If-Match: *
Result: ❌ Error
Delete the attachment using DELETE:
DELETE {{server-url}}/data/ReleasedProductDocumentAttachments(dataAreaId='Id',ItemNumber='100',DocumentAttachmentTypeCode='File',AttachmentDescription='test',AttachedDateTime=2026-02-20T06%3A20%3A53Z)
Result: ✅ Success
{
"error": {
"message": "An error has occurred.",
"innererror": {
"message": "Write failed for table row of type 'EcoResReleasedProductDocumentAttachmentEntity'. Infolog: Error: Operation not supported.."
}
}
}
Root Cause Analysis
1. EcoResDocumentAttachmentEntity explicitly blocks updates
The base entity EcoResDocumentAttachmentEntity has the following update() method that throws an error unconditionally:
// EcoResDocumentAttachmentEntity.update()
public void update()
{
throw error('@SCM:EcoResDocumentAttachmentEntityOperationNotSupported');
}
Since EcoResReleasedProductDocumentAttachmentEntity extends EcoResDocumentAttachmentEntity, it inherits this behavior. This means no document attachment entity that extends this base class can support PATCH/UPDATE via OData.2. DocuRefEntity supports updates for whitelisted fields but is NOT public
The DocuRefEntity has a proper whitelisted update mechanism:
// DocuRefEntity.update()
// "Updating records through this data entity is not supported for fields not whitelisted."
// "Notes, Name and Restriction fields are whitelisted."
However, DocuRefEntity has IsPublic = No, so it is not exposed via OData and cannot be accessed through the REST API.3. Overlayering is not available
DocuRefEntity belongs to the Application Foundation package, which is sealed. Overlayering is disabled and IsPublic cannot be changed via extension.4. D365 UI uses an internal API
The D365 web UI updates attachment fields through the internal ProcessMessages form messaging system, which is session-based and not not sure if accessible externally.5. Summary of the gap
There is a design gap where:The public entity (EcoResDocumentAttachmentEntity) blocks updates
The entity that supports updates (DocuRefEntity) is not public
The package is sealed, so neither can be modified without a custom entityWhat is the recommended approach to update Notes and Description fields on document attachments via OData/REST API?
Is there a plan to make DocuRefEntity public (IsPublic = Yes) in a future update, or to enable PATCH support on document attachment entities like EcoResReleasedProductDocumentAttachmentEntity?
Is creating a custom entity (based on DocuRefEntity) the recommended approach for this scenario? If so, are there any guidelines or best practices?
Is the Delete and Re-create pattern (DELETE existing record, then POST a new one with updated fields) an acceptable workaround for production use.