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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 509 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 375

#3
Adis Profile Picture

Adis 268 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans