web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Odata call to update DirPartyRelationship

(0) ShareShare
ReportReport
Posted on by 40

I am trying to update (PATCH) a party relationship via  the DirPartyRelationShip entity.

I have tried to PATCH on this:

{{resource}}/data/PartyRelationships(RelationshipType='BeneficiaryTrust',ParentPartyId='000000603',ChildPartyId='000000403',LegalEntityDataArea='',ValidTo='2154-12-31T23:59:59Z', ValidFrom = '2023-02-09T07:06:13Z')

but I am getting a 404:

{
    "Message": "No HTTP resource was found that matches the request URI 'https://xxxx.dynamics.com/data/PartyRelationships(RelationshipType='BeneficiaryTrust',ParentPartyId='000000603',ChildPartyId='000000403',LegalEntityDataArea='',ValidTo='2154-12-31T23:59:59Z', ValidFrom = '2023-02-09T07:06:13Z')'. No route data was found for this request."
}

Any idea what I am doing wrong in my request

A get on this endpoint will return data like:

{
    "@odata.context": "https://xxx.dynamics.com/data/$metadata#PartyRelationships",
    "value": [
        {
            "@odata.etag": "W/\"JzEsNTYzNzE1MTMyNabcLDU2MabcNDQ2MDAn\"",
            "RelationshipType": "BeneficiaryTrust",
            "ParentPartyId": "000000603",
            "ChildPartyId": "000000403",
            "LegalEntityDataArea": "",
            "ValidTo": "2154-12-31T23:59:59Z",
            "ValidFrom": "2023-02-09T07:06:13Z",
            "CustomField1": "test"
        }
    ]
}

I have the same question (0)
  • Verified answer
    AnithaEswaran Profile Picture
    2,032 on at

    Hi,

    I tried in my system for the same entity.

    Try this : 

    /data/PartyRelationships(RelationshipType='ContactPerson',ParentPartyId='000004348',ChildPartyId='000005276',ValidTo=2154-12-31T23:59:59Z, ValidFrom = 2015-10-22T13:16:37Z,LegalEntityDataArea=' ')

    Remove speech marks from ValidTo & ValidFrom fields

    pastedimage1675959140558v1.png

  • Zisis Profile Picture
    40 on at

    You are a hero, well spotted!

    But now I am facing another issue.. :/

    Any idea why it doesnt seem to update the ValidTo datetime?

    It responds back 204 - no content as expected but the 'ValidTo' field doesn't change value:

    Patch request body:

    {
        "ValidTo": "2025-12-31T23:59:59Z"
    }

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 704 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 570 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 408 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans