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,

No comments:

Post a Comment

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...