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)

Dynamics 364 DataEntity import of ValidTimeState table

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a custom table, in which i have activated the validtimestate property, of type UTCDateTime. It behaves correctly on insert and update of the records.

I have created also a DataEntity for this custom table, which i will use primarly for importing data. In the entity i have activated also the property ValidTimeStateEnabled.

The problem is, that when i do an import, the field FromDate and ToDate are null (1900-01-01 00:00:00.000). I was expecting that it menages automatically the field From and To date, but it does not. As a result i have new records inserted on the table, but with From and ToDate not effective.


Am i missing any property or is this something i should correct in code?

Any help is much appreciated.

Thanks in advance

*This post is locked for comments

I have the same question (0)
  • Jialin Liu Profile Picture
    on at

    Hi Astina,

    I'm not sure what are you mean ...

    but if your goal is to import new records or update exist record then I think that the DataEntity cannot be a ValidTimeStateEnabled table, in the class when you try to find the record in the target table make sure to use select ValidTimeState (from date, to date)

  • Community Member Profile Picture
    on at

    Hi Sukrut,

    Yes, if i populate those fields in the file of import, the entity works correctly. But in the file of import, the client does not want to populate those fields. He wants to insert them with ValidFrom = systemdateGet, validto= datemax, and on update to work as it does on manual update.

    Do you have any suggestion on how to achieve this?

    Thanks a lot,

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