Showing posts with label CreateNewTimePeriod. Show all posts
Showing posts with label CreateNewTimePeriod. Show all posts

16 January 2015

How does date effective CreateNewTimePeriod work

Two different descriptions of CreateNewTimePeriod update mode lead me to the question - how does it actually work?

Description 1 (msdn)
When you change a field value from a valid time state table, the current record in the table is closed and a new record is created. The current date, or current date and time, populate the ValidTo field of the closed record and the ValidFrom field of the new record.

Description 2 (Inside Microsoft Dynamics AX 2012)
The date-effective framework creates a new record with updated values, and updates the ValidTo of the edited record to a value of ValidFrom -1 of the newly inserted record.

Problem description
What sequence of methods is used in CreateNewTimePeriod update mode?

Steps
1. Open DirPartyTable form
2. Add a new address
3. Modify the address

Hints
Add infolog messages to insert and update methods of LogisticsPostalAddress table.