Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Dynamics 364 DataEntity import of ValidTimeState table

Posted on by Microsoft Employee

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics 364 DataEntity import of ValidTimeState table

    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,

  • Jialin Liu Profile Picture
    Jialin Liu on at
    RE: Dynamics 364 DataEntity import of ValidTimeState table

    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)

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans