Alfasith AX

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

Sunday, June 15, 2014

How to call job to another job in axapta using x++ code

Hi,

1. Create simple job Job2  and add it to action menu item.
2. Call Job2  in other Job1 using following code.

   Args                    args; 
    ; 
    
    args = new Args(); 
    args.name(identifierStr(Job2  )); 
    new menuFunction(menuItemActionStr(Job2 ), MenuItemType::Action).run(args);
//Here Job2 in last line is the name of the menu item and in above that is name of the job

Regards,

Wednesday, June 11, 2014

Job that fetched from the current company / companytInfo table records sample in Dynamic AX

Hi,

static void CompanyInformations(Args _args)
{
    CompanyInfo   companyInfo = CompanyInfo::find();

    print  "CompanyPhone                = " +companyInfo.phone();
    print  "CompanyTeleFax              =" +companyInfo.teleFax();
    print  "CompanyGiro                 =" +companyInfo.Giro;
    print  "CompanyCoRegNum             =" +companyInfo.CoRegNum;
    print  "CompanyEnterpriseNumber     =" +companyInfo.EnterpriseNumber;
    print  "CompanyName                 =" +companyInfo.name();
    print  "CompanyAddress              =" +companyInfo.postalAddress().Address;
    print  "standardCurrency            =" +CompanyInfo::standardCurrency();
    pause;
}

Regards,

Get a table ID in SQL - D365

Hi select ID from SysTableIdView where  SysTableIdView .Name = 'CustTable' Regards,