Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Tuesday, December 16, 2014

Code / Job to run any application from AX

Hi,

    static void AlfasithRunAnyApplication(Args _args)
    {
        WinAPI::shellExecute("D:\\Dynamic Netsoft Construction Suite V2.pptx");
        WinAPI::shellExecute("C:\\Users\\dns.amohamed\\Downloads\\Love Mash Up.mp3");
        // Here Application will wait till previous application opens / runs
    }

Regards,

Sunday, December 14, 2014

Code to refresh AOS and remove *.AOC files in AX

Hi,

static server void refreshAOS(Args _args)
{
    ;

    xSession::removeAOC();
    SysTreeNode::refreshAll();
    SysFlushDictionary::doFlush();
    SysFlushAOD::doFlush();
    xSession::updateAOC();
}

Regards,

REF: http://www.dynamicsaxlatino.com/limpiar-flush-cache-de-aos-o-aot-en-ax/

How to invoke and iterate List as Contract methods in AX 2012/ D365

Hi, Public void performContractIterate(ClassContainsListAsContract    _ListCarryClass) { List contractFieldList = new List(Types::Class); ...