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)

Created and modified date time fields

(0) ShareShare
ReportReport
Posted on by 336

Hi All,

I have a quick technical question about 2 standard fields in AX ( Created date time & Modified date Time ),

I'm working now on a SQL Query, and i'm using " LOGISTICSELECTRONICADDRESS " table, but i didn't find these 2 fields,

PS: I'm obliged to use SQL, and i need to know the date of creation and modification of the customer contact, im wondering if there is any alternative to do that, or other fields to trieve Creation / Modification date.

Here is my SQL Query:

SELECT

CUSTTABLE.ACCOUNTNUM                               AS [Customer account],
LOGISTICSELECTRONICADDRESS.DESCRIPTION             AS [Description],
LOGISTICSELECTRONICADDRESS.TYPE                    AS [Type],
LOGISTICSELECTRONICADDRESS.LOCATOR                 AS [Contact Number/Address],
LOGISTICSELECTRONICADDRESS.ISPRIMARY               AS [Primary],
CUSTTABLE.DATAAREAID                               AS [Data Area Id]

FROM CUSTTABLE, DIRPARTYLOCATION, LOGISTICSELECTRONICADDRESS

WHERE CUSTTABLE.PARTY = DIRPARTYLOCATION.PARTY
AND LOGISTICSELECTRONICADDRESS.LOCATION = DIRPARTYLOCATION.LOCATION

ORDER BY CUSTTABLE.ACCOUNTNUM, CUSTTABLE.CREATEDDATETIME

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    If you don't see those fields, you need to enable CreatedDateTime and ModifiedDateTime properties for the table in AX.

  • AdnDalhi Profile Picture
    336 on at

    Yes, if i activate these properties, i will be able to see the "CreatedDateTime" & "ModifiedDateTime" fields in SQL ?

    I have a production environement, is that sure step ?

  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    You need to deploy such changes to prod in a controlled manner. Perhaps you already have a process for that, and some technical experts who perform the actual deployment.

    You should not do any ad hoc changes directly in prod AOT.

    If you are in doubt, please search the web for white paper about Deploying customizations across AX2012 environments.

  • Suggested answer
    Satish Panwar Profile Picture
    14,671 Moderator on at

    It is sure thing (if table will allow you to add, then it will become visible @ SQL) and that's why you want to do this in non-production environment first (not sure if you intend to do this in prod directly).

  • AdnDalhi Profile Picture
    336 on at

    I've just changed the 2 table properties in AX Test Environement, but i cannot see the fields yet @SQL

  • Suggested answer
    Satish Panwar Profile Picture
    14,671 Moderator on at

    did you complete sync?

  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    You need to synchronize the database. Please talk to developers in your company, you need to follow the dev process that is defined for your project / company. Otherwise your changes might be wiped out with next code deployment.

  • Suggested answer
    Mohammed Khatib Profile Picture
    430 on at

    Hi Adax,

    It is much better to join your query to LogisticsLocation table which already has these fields.

    Note: Every Electronic address will have one Location record (1:1) relation

  • AdnDalhi Profile Picture
    336 on at

    Thanks Mohammed for you reply,

    But my records is in LogisticsEletronicAddress table,

    Do you mean, i need to add a join between LogisticsElctronicAddress table and LogisticsLocation?

    If yes, in this case i will get the CreatedDateTime & ModifiedDateTime for the records in LogisticsLocation table and not EletronicAddress,

    Can you provide an example please by modifiyin my Query

    .

    Thanks in advance.

  • Verified answer
    Mohammed Khatib Profile Picture
    430 on at

    SELECT

    CUSTTABLE.ACCOUNTNUM                               AS [Customer account],

    LOGISTICSELECTRONICADDRESS.DESCRIPTION             AS [Description],

    LOGISTICSELECTRONICADDRESS.TYPE                    AS [Type],

    LOGISTICSELECTRONICADDRESS.LOCATOR                 AS [Contact Number/Address],

    LOGISTICSELECTRONICADDRESS.ISPRIMARY               AS [Primary],

    CUSTTABLE.DATAAREAID                               AS [Data Area Id],

    LogisticsLocation.CREATEDDATETIME   AS [Created Date Time],

    LogisticsLocation.MODIFIEDDATETIME   AS [Modified Date Time]

    FROM CUSTTABLE

    inner join DIRPARTYLOCATION

    on DIRPARTYLOCATION.PARTY = CustTable.PARTY

    inner join LOGISTICSLOCATION

    on LogisticsLocation.RECID = DIRPARTYLOCATION.LOCATION

    and LogisticsLocation.ISPOSTALADDRESS = 0

    inner join LOGISTICSELECTRONICADDRESS

    on LOGISTICSELECTRONICADDRESS.LOCATION = LogisticsLocation.RECID

    ORDER BY CUSTTABLE.ACCOUNTNUM, CUSTTABLE.CREATEDDATETIME

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