Question Status

Suggested Answer
Mel III Cabillada asked a question on 10 Feb 2014 8:21 PM

AX 2012 R2 Class Application startupPost method customized code error abort AX client.

How to enter AX again? i can't login again to correct the wrong coding because of this fatal error.

"Microsoft Dynamics AX client has stopped working.

A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."

I cannot enter my AX anymore! Why? because i put a wrong code in Class Application StartupPost method

// No SYS code must exist in this method

// If you need the startup command, look in the class SysStartupCmd

void startupPost()

{

   // <GTH>

   Args args = new Args();

   #isoCountryRegionCodes

   if (hasGUI()

       && isRunningMode()

       && !SysModelStore::isInstallMode()

       && SysCountryRegionCode::isLegalEntityInCountryRegion([#ISOTH])

       && isConfigurationkeyEnabled(configurationKeyNum(TaxThailandGovCertification)))

   {

       TaxThaiGovCertificationHelper::promptSysAboutForm(false);

   }

   // </GTH>

   new MenuFunction(MenuItemDisplayStr(RBMT_Main),MenuItemType::Display).run(Args);

}

my problem code is *new MenuFunction(MenuItemDisplayStr(RBMT_Main),MenuItemType::Display).run(Args);*

yeah i should have put it in an 'if (curUserId() == "me")' yeah i should have ... it should have never been there.

i modified in the USR layer. Tried to login again but the AX client can't enter into AX so i can't modify anything. Tried to login in lower layer but still i can't come in.

tried to use Visual Studio 2010 Application Explorer to save class to XPP and open notepad to modify and reload to application explorer, but still can't login.

I am unwelcome.

Is there a way in to AX without going through Class Application startupPost method?

it's like i can't enter my home even if i got my keys.

more problem is i have 2 other developer mates who can't login so they're really pissed, they need their codes too.

Please anybody knows how to overpass Class Application startupPost method?

I can't get in my AX!

Thanks very much.

Reply
Suggested Answer
André Arnaud de Calavon responded on 10 Feb 2014 11:37 PM

Hi Mel,

If your changes is the only change in  the USR layer, you can delete the USR-model.

How to delete a model: technet.microsoft.com/.../hh433514.aspx

If this is not the case, you can restore the model database from a backup where your code was not applied yet.

After both options, you need to compile your application first.

kind regards,

André Arnaud de Calavon  |  Microsoft Dynamics AX Solution architect  |  My blog  |  My company

This post is my own opinion and does not necessarily reflect the opinion or view of my company, Microsoft, both its employees, or other MVPs.

Reply
Suggested Answer
Mel III Cabillada responded on 11 Feb 2014 12:19 AM

its solved by using a Configuration command to run at kernal startup: -NOAUTO

1.) Open Microsoft Dynamics AX Configuration Utility.

2.) in Tab [General], the entry field "Configuration command to run at kernel startup"

3.) type the command -noauto

4.) run MS Dynacmics AX

Thanks.

:)

Reply
Suggested Answer
André Arnaud de Calavon responded on 10 Feb 2014 11:37 PM

Hi Mel,

If your changes is the only change in  the USR layer, you can delete the USR-model.

How to delete a model: technet.microsoft.com/.../hh433514.aspx

If this is not the case, you can restore the model database from a backup where your code was not applied yet.

After both options, you need to compile your application first.

kind regards,

André Arnaud de Calavon  |  Microsoft Dynamics AX Solution architect  |  My blog  |  My company

This post is my own opinion and does not necessarily reflect the opinion or view of my company, Microsoft, both its employees, or other MVPs.

Reply
Mel III Cabillada responded on 11 Feb 2014 12:17 AM

Hi Andre,

Thanks for the suggestion.

We did all our customization in the USR layer in the standard model so deleting the USR model was very hard to decide.

We did have backups that was about a week late, so we satisfied ourselves with the backups.

but i can't give up with this AOS, i need entry to save some codes. And i did.

:)

Reply
Suggested Answer
Mel III Cabillada responded on 11 Feb 2014 12:19 AM

its solved by using a Configuration command to run at kernal startup: -NOAUTO

1.) Open Microsoft Dynamics AX Configuration Utility.

2.) in Tab [General], the entry field "Configuration command to run at kernel startup"

3.) type the command -noauto

4.) run MS Dynacmics AX

Thanks.

:)

Reply
Douglas Noel responded on 11 Feb 2014 12:26 AM

Hi all,

I think adding the commandline switch -noauto to the ax32.exe link  will work also.

regards

Douglas

Reply