Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

AX 2012 _callInsertLogic in insertUpdate()

$
0
0

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.

AllocateMethod1
CurrencyUSD
ModelId<some_model>
StartDate2016-01-15
EndDate2016-01-21
InventDimId<some_dim>
InventQty10
ItemId<some_id>
Report0
Amount100
Freq1
FreqCode1
SalesPrice10
SalesUnitIdea
Active1
PriceUnit1

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()?


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>