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

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Update PartyLocationPo...
Finance forum

Update PartyLocationPostalAddress using Odata URL

(0) ShareShare
ReportReport
Posted on by

Hi,

I need to update the PartyLocationPostal address using Odata URL. For this I need to fetch the existing records using keys values.

https://<myEnviroment>.cloudax.dynamics.com/Data/PartyLocationPostalAddress(PartyNumber='000000304',LocationId='000004774',ValidFrom='2018-06-28 12:11:06.000')?cross-company=true

I am not getting the result.

Let me know the correct Odata URL to get the result.

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Update PartyLocationPostalAddress using Odata URL

    Do you have a record where validFrom is exactly that value?

    Anyway the valid time state entities (with ValidFrom and ValidTo behave a bit differently than other entities. If you want the "current" record, you don't have too provide any date filter, D365FO handles it automatically.

    [View:https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-tools/date-effectivity]

  • Community Member Profile Picture
    on at
    RE: Update PartyLocationPostalAddress using Odata URL

    I have also checked the url with out validfrom but still it showing no records.

  • Okay Akdeniz Profile Picture
    110 on at
    RE: Update PartyLocationPostalAddress using Odata URL

    Try this,

    https://<environment>.cloudax.dynamics.com/data/PartyLocationPostalAddresses?$filter%20PartyNumber eq '000000304'&$filter=LocationId eq '000004774'&$filter ValidFrom gt '2018-06-28T12:11:06Z'?cross_company=true

  • Suggested answer
    Gaborg Profile Picture
    12 on at
    RE: Update PartyLocationPostalAddress using Odata URL

    I know this is an old post but I've been having the same issue as of now and I was looking for a resolution for a while. For those of you still struggling with the issue, there are two things to look out for:

    1. The DateTime must not be put between quotes, because then the OData will handle it as a string instead of date.

    2. The value must be a properly formatted DateTimeOffset like: 1970-01-01T00:00:00Z

    The posted URL should be as follows:

    https://<myEnviroment>.cloudax.dynamics.com/Data/PartyLocationPostalAddress(PartyNumber='000000304',LocationId='000004774',ValidFrom=2018-06-28T12:11:06.000Z)?cross-company=true

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans