I'm new to AX and I'm currently working on using DIXF to import data into the ForecastSales table. I did this by way of creating a custom entity from a wizard based on the ForecastSales table. The following is an example of a row I attempted to import.
AllocateMethod | 1 |
Currency | USD |
ModelId | <some_model> |
StartDate | 2016-01-15 |
EndDate | 2016-01-21 |
InventDimId | <some_dim> |
InventQty | 10 |
ItemId | <some_id> |
Report | 0 |
Amount | 100 |
Freq | 1 |
FreqCode | 1 |
SalesPrice | 10 |
SalesUnitId | ea |
Active | 1 |
PriceUnit | 1 |
It appears, however, that when I import the row only the forecast definition record was created, and neither a corresponding exploded forecast record nor corresponding row in the ForecastInvent table was created.
Based on my research and looking at the X++ codes I believed that the issue was that the doInsert() method was being run instead of insert() in the insertUpdate() method. After looking at the insertUpdate() method I saw the following code:
if (_callInsertLogic)
{
_target.insert();
}
else
{
_target.doInsert();
}
Seeing this I thought that perhaps all I needed to do was check the "Run business logic in insert or update method" and then everything should work.
That, however, did not work. Perhaps I am missing something here? How do I get the class to run insert() instead of doInsert()?