Question Status

Verified
Kauto asked a question on 3 Dec 2013 3:59 AM
Hi, When I try to run the CHECK UPGRADE READINESS function in the Pre-processing checklist for upgrading AX4 to AX 2012 R2 - I get the following error: Error: Error executing code: Wrong argument types in variable assignment. Stack trace (S)\Classes\ReleaseUpdateDB\parmScriptStage - line 4 (S)\Classes\ReleaseUpdateDB\constructList - line 20 (S)\Classes\ReleaseUpdateCockpit\loadJobs - line 36 (S)\Classes\ReleaseUpdateCockpit\init - line 18 (C)\Forms\ReleaseUpdateCockpit\Methods\init (C)\Classes\SysSetupFormRun\init - line 3 (C)\Classes\ReleaseUpdateCockpitLoader\main - line 84 (C)\Classes\MenuFunction\run (C)\Classes\SysHelp\processMenuFunction - line 69 (C)\Classes\SysHelp\processStandardLink - line 18 (C)\Classes\SysHelp\processOnEventNavigate - line 43 (C)\Classes\SysHelp\onEvent_BeforeNavigate2 - line 27 (C)\Classes\FormActiveXControl\onEvent_BeforeNavigate2 Has anyone came across this before - it would indicate that an enum value _ScriptStage is not being passed into the code correctly, or is not of the correct data type. Any help here would be appreciated
Reply
Verified Answer
Kevin Kidder responded on 5 Aug 2014 5:44 PM

Manish - this is not something that is wrong with the AX 4.0 upgrade process, it is simply a requirement that you must perform the Compile Forward option on the ReleaseUpdateDB class by choosing Add-Ins->Compile Forward and allowing the compile to finish. This is documented in the upgrade guide as being a requirement because the importing of the XPO in version AX 4.0 was a single pass compiler.

If you have performed the CompileForward on the ReleaseUpdateDB class (and make sure you chose that class and not one of the similarly named ones like I do by accident sometimes) then you should not be seeing the error that was listed at the beginning of this string. The only reason I can think of why you may be seeing this is if your AX 4.0 environment does not have the X++ development license enabled which would prevent the Compile Forward from working correctly. We would require a developer license to run through the upgrade processes.

If that doesn't address it, then I would recommend opening a support request for an engineer to look into the issue further.

Kevin

Reply
Suggested Answer
Tina van der Vyver responded on 31 Jul 2014 9:27 AM

We had exactly the same error.

We solved it by running "Compile forward" on the ReleaseUpdateDB class.

Hope that helps! 

Tina

Reply
Suggested Answer
UMESH PANDIT responded on 31 Jul 2014 4:23 PM

Hi Kauto,

Do  Compile forward...

--

Thank you
Note - This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft.
Reply
lispyj responded on 3 Dec 2013 7:50 AM

I am not sure about AX4, but in AX2009 ReleaseUpdateDB is in the sys layer.  I had a similar error during my AX2009 to AX2012 upgrade because there were modifications to the releaseUpdateDB classes leftover from the AX3 to AX2009 upgrade.  I removed the mods and reimported the XPO.

Reply
Kauto responded on 4 Dec 2013 1:01 AM

Hi,

Yeah you are correct, ReleaseUpdateDB does exist in version 4 in the Sys layer.  As instructed, I import the AX4 upgrade XPO from the 2012 R2 CD and then compile the AOT afterwards.

I have debugged the code and I cannot see the exact error - this is causing me major issues - can anyone else shed some light on this towards a solution?

Reply
Kauto responded on 4 Dec 2013 10:24 AM

Update: If I manually assign the enum value inside the parmScriptStage method - I can access the form options - the values are not being passed correctly into the parmScriptStage method, I appear to be able to work around this, however it must be Microsoft issue, I am amazed there are not more AX4 users that have experienced this in their upgrade attempt.

Reply
lispyj responded on 4 Dec 2013 10:38 AM

You don't mention if you are slipstreaming an update along with AX2012 R2.  There is an upgradeax4.xpo file dated 10/31/2013 in the CU7 DatabaseUpgrade directory, so perhaps the problem was fixed with an update.

Reply
Suggested Answer
Tina van der Vyver responded on 31 Jul 2014 9:27 AM

We had exactly the same error.

We solved it by running "Compile forward" on the ReleaseUpdateDB class.

Hope that helps! 

Tina

Reply
Suggested Answer
UMESH PANDIT responded on 31 Jul 2014 4:23 PM

Hi Kauto,

Do  Compile forward...

--

Thank you
Note - This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft.
Reply
Manish Moothedath responded on 31 Jul 2014 10:23 PM

Hi all,

I can't see the option Compile forward in AX4.0. How to go about this???

Thanks,

Manish

Reply
Tina van der Vyver responded on 1 Aug 2014 7:07 AM

Right click on the class and choose Add-Ins -> Compile Forward.

Reply
Manish Moothedath responded on 5 Aug 2014 3:48 AM

Hi,

I'm getting the same error as mentioned above by Kauto. IS this something wrong with AX4.0 ? Any patches released for this issue?? or is it wrong with the UpgradeAX4.xpo file we are importing ???

I have tried compile forward on ReleaseupdateDB but no luck

Regards,

Manish

Reply
Verified Answer
Kevin Kidder responded on 5 Aug 2014 5:44 PM

Manish - this is not something that is wrong with the AX 4.0 upgrade process, it is simply a requirement that you must perform the Compile Forward option on the ReleaseUpdateDB class by choosing Add-Ins->Compile Forward and allowing the compile to finish. This is documented in the upgrade guide as being a requirement because the importing of the XPO in version AX 4.0 was a single pass compiler.

If you have performed the CompileForward on the ReleaseUpdateDB class (and make sure you chose that class and not one of the similarly named ones like I do by accident sometimes) then you should not be seeing the error that was listed at the beginning of this string. The only reason I can think of why you may be seeing this is if your AX 4.0 environment does not have the X++ development license enabled which would prevent the Compile Forward from working correctly. We would require a developer license to run through the upgrade processes.

If that doesn't address it, then I would recommend opening a support request for an engineer to look into the issue further.

Kevin

Reply
Manish Moothedath responded on 6 Aug 2014 12:13 AM

Kevin,

Thanks a lot for your suggestion!!!  It seems to be the issue with the developer license.  Any other work around for this ?

For compile forward can I do - Syscompileroutput::CompileForward(Classname2Id('ReleaseUpdateDB'));

Regards,

Manish

Reply