Thanks it is Ax3.0 SP5
-----Original Message----- From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of AX CONS Sent: 28 July 2007 01:57 To: Axapta-Knowledge-Village@yahoogroups.com Subject: Re: [Axapta-Knowledge-Village] Blank InventDim problem Hello James, Which Version of Axapta are you using? Gokhan Kestek [EMAIL PROTECTED] [EMAIL PROTECTED] On 7/19/07, James Flavell <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > Can anyone help me to understand why the following code is like it is in > SYS > layer > > Basically the findOrCreateBlank() method on the inventdim is returning an > empty inventdim when it is supposed to be returning 'Axapta'!!!! > > I can understand the code and I can see I could make my call > findOrCreateBlank(false) and it would be okay but I am just unsure of the > reason this code even exists in the method and what the correct calling > should be. > > My call is: > > suppItemTable.InventDimId = > inventDim::findOrCreateBlank().inventDimId; > > this in turn calls the following method which has some test of > configuration > key which is causing the problem: > > static InventDim findOrCreateBlank(boolean testConfigurationKey = true) > > { > > InventDim inventDim; > > #define.blank('Axapta'); > > //This is where it goes wrong since AdvancedLogistics is enabled > > //Why should the blank inventdim be different when AdvancedLogistics is > enabled, I thought it was always 'Axapta' regardless of what modules you > have? > > if (testConfigurationKey && > isConfigurationKeyEnabled(configurationKeyNum(LogisticsAdvanced))) > > return inventDim; > > inventDim = InventDim::find(#blank); > > if (inventDim.recId) > > return inventDim; > > inventDim = InventDim::findDim(inventDim); > > if (inventDim.recId) > > return inventDim; > > ttsBegin; > > inventDim.inventDimId = #blank; > > inventDim.insert(true); > > ttsCommit; > > return inventDim; > > } > > Thanks > > James > > [Non-text portions of this message have been removed] > > > [Non-text portions of this message have been removed] Sharing the knowledge on Axapta. Visit www.frappr.com/axapta for axapta friends. Come and choose your preferred name for Microsoft Dynamics AX on the Axapta Knowledge Village, Visit www.axapta-knowledge-village.tk Yahoo! Groups Links