Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

EngineeringChangeManagement Product Document Attachments

(3) ShareShare
ReportReport
Posted on by 28
Hi everyone, 

I am working with D365FO Odata Services and EngineeringChangeManagement. One of my tasks is to provide a request for attaching documents to products attached to an ECO header. From the Odata Metadata, I already saw that there is an Entity for those documents: EngineeringChangeOrderProductDocuments
However I am not able to create an entry by running a Post request like that:
 
{{d365_url}}/data/EngineeringChangeOrderProductDocuments
{
    "dataAreaId": "demf",
    "EngineeringChangeOrderProductLineNumber": 1,
    "EngineeringChangeOrderNumber": "RestEco",
    "DocumentId": "{Some-Document-ID-I-got-from-DocuRef-table}"
}
 
This request will result in this error:
 
{
    "error": {
        "code": "",
        "message": "An error has occurred.",
        "innererror": {
            "message": "Write failed for table row of type 'EngChgEngineeringChangeOrderProductDocumentEntity'. Infolog: Warning: Matching record for the read only data source 'DocuRef' does not exist.",
            "type": "Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataWriteException",
            "stacktrace": "   at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateProcessor.CreateEntity_Save(ChangeOperationContext context, ChangeInfo changeInfo)\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.ChangeInfo.ExecuteActionsInCompanyContext(IEnumerable`1 actionList, ChangeOperationContext operationContext)\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.ChangeInfo.TrySave(ChangeOperationContext operationContext)\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateManager.SaveChanges()\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataDelegatingHandler.<SaveChangesAsync>d__2.MoveNext()"
        }
    }
}
 
I am not sure why it is not working. (I understand the error message, but I don´t see the point why it is not working tbh. Why should that data entity exist at all?) 
Plus, as a more general thing I am not completly sure how Documents should be loaded to the system using Odata at all. Do I need to fill DocuRef, DocuValue and DocuHistory for that by using Custom Services or is there another way?

Thanks for helping!
Categories:
  • CH-11120820-0 Profile Picture
    CH-11120820-0 28 on at
    EngineeringChangeManagement Product Document Attachments
    Hi, 
     
    not really, I have also read the error message. But I am not sure on how to continue with the topic. Why does the entity exists at all. It is useless without the possibility to add things using OData. I am also not sure how the Documents work in D365FO at all.
  • Waed Ayyad Profile Picture
    Waed Ayyad 6,585 Super User 2024 Season 2 on at
    EngineeringChangeManagement Product Document Attachments

    Hi, 

    Is your issue resolved? If yes, mark the answers that helped you as verified. 

    Thanks,

    Waed Ayyad

  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 6,585 Super User 2024 Season 2 on at
    EngineeringChangeManagement Product Document Attachments
    Hi,
     
    DocuRef  datasource is ready only on EngineeringChangeOrderProductDocuments dataentity.
     
     
    Thanks,
    Waed Ayyad
     
     
     
     
     

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,759 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,468 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans