0

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.

ElanG.

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50

2 Answers2

3

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.

:)

0

In case you do not need the usr layer anymore you can just delete/uninstall the usr model. Provided you left it on the standard model. Then try again. Anyway I hope you have daily backups so if deleting the usr layer is not an option for you or if it did not solve your problem you can just restore a backup right?

Chino
  • 821
  • 6
  • 13
  • Hi Chino, thanks for the suggestion. All customizations were done in the usr standard model. Yes we have backups of about a week late in updates. Using the backups is a bitter pill to swallow, a couple of developers are grumbling why they have to rework some codes. Actually it's a Development AOS so data loss may be forgiven. It's sad the only option is to delete the usr layer/model and use AOS backups for a recovery that is still a disaster. – Elan G. Steel III Feb 07 '14 at 06:41