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 :
Microsoft Dynamics AX (Archived)

How to get value of column ValidToTZId, ValidFromTZId in LogisticsPostalAddress table use X++ ?

(0) ShareShare
ReportReport
Posted on by

Can everyone help me, how to get value of colunm ValidToTZId, ValidFromTZId in LogisticsPostalAddress use X++

Normally, I create an object of LogisticsPostalAddress , an I can get value of columns in table that use property of table, but with two column ValidToTZId, ValidFromTZId, I can't apply that way

My code like this:

LogisticsPostalAddress logisticsPostalAddress;
LogisticsPostalAddressContract logisticsPostalAddressObj;

// code successfully run
logisticsPostalAddressObj.paramADDRESS(logisticsPostalAddress.Address);
logisticsPostalAddressObj.paramSTATE(logisticsPostalAddress.State);
...

// not find property VALIDTOTZID
logisticsPostalAddressObj.paramVALIDTOTZID();
// not find property VALIDFROMTZID
logisticsPostalAddressObj.paramVALIDFROMTZID();


Moreover, I found that the structure of table LogisticsPostalAddress has column  ValidToTZId and ValidFromTZId

Thank you,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    These fields are not accessible directly from AX; it's what AX creates under the hood for UTCDateTime fields.

  • Community Member Profile Picture
    on at

    Is there any way to get value of that column, ex: built-in AX or custom method ?

    Thank Martin,

  • Mea_ Profile Picture
    60,284 on at

    Hi Huan Bui,

    No, there is not way, as far as I know, but what are you trying to achieve ?

  • Community Member Profile Picture
    on at

    Hi ievgen Miroshnikov,

    I have a requirement that synchronize data between database AX and a other database,

    that I create a service in AX to return data of table, full data of every row in table AX, then consume service to push data to database

    Thank ievgen,

  • Verified answer
    Mea_ Profile Picture
    60,284 on at

    Please read this msdn article msdn.microsoft.com/.../cc622312.aspx to get details about *TZId fields.

    As you may read in that article there is not way to get this values from x++ (except doing direct SQL query), but it says that 2 fields in SQL are represented by one field in AX that stores UTC datetime and time zone id.

    Using DateTimeUtil::getOriginatingTimeZone() method you can get time zone id from ValidFrom field and pass it to your method.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans