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.

02 January 2015

Alert and database log coexistence

While testing Database log functionality I found a tricky behaviour which can cause unwanted results.

Problem description
Alert is not generated, although Alert rule is enabled.

Steps
1. Create a new alert rule for Customers insert event
Accounts receivable > All customers > select Customer account field and right click > Create alert rule...

2. Add Customers table to Database log using a standard wizard
System administration > Setup > Database > Database log setup > New > Next > Open General ledger and select Customers

3. Create a new customer

4. Run Change based alerts job
System administration > Periodic > Alerts > Change based alerts

5. No alert is generated

Below you will find hints and solution description, however challenge yourself and try to repeat described steps and make assumptions :-)

Hints
Compare data in DatabaseLog table for CustTable before and after step 2.

01 January 2015

Welcome to Dynamics AX Hints!

Hello,

My name is Oleg Abapolov. I have been working with Dynamics AX since 2005, but I still find something new, undocumented or unknown. I decided to write a blog about such interesting findings.

In each post I will describe some problem as well as steps to reproduce it. Hints will help to guess one of possible solutions, which will be hidden under cut. My goal is to stimulate you to think about a solution and if your solution is different from posted, I would kindly ask you to share it.

As today is a special day I want to wish everybody a Happy New Year!
In Dynamics AX world this year is expected to be very interesting, especially with release of next version.
Let's make it more fun and exciting by posting and discussing findings and solutions! :-)