print Sales Picking List via Jobs X++ AX 2012

static void Job6(Args _args)
{
    WMSPickingRoute         wmsPickingRoute;
    WmsPickingList_OrderPickController  aiController = new WmsPickingList_OrderPickController();
    WmsPickingList_OrderPickContract    aiContract   = new WmsPickingList_OrderPickContract();
    SRSTmpDataStore                     srsTmpDataStore;
 
    select firstOnly wmsPickingRoute where wmsPickingRoute.RecId==5637144577;//iisi sendiri jngn malas
    
    srsTmpDataStore.Value = Global::buf2Con(wmsPickingRoute);
    ttsbegin;
    srsTmpDataStore.insert();
    ttscommit;
 
    aicontroller.parmReportName(ssrsReportStr(WmsPickingList_OrderPick,Report));
    aicontroller.parmShowDialog(false);
 
    aiController.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::Screen);
   // aiController.parmReportContract().parmPrintSettings().printerName(“Xerox WorkCentre 3210 PCL 6 (Copy 1)”);
 
    aiContract.parmPickingRouteId(srsTmpDataStore.recid);
    aiContract.parmDocumentTitle(“x”);
    aiContract.parmShowRegistered(true);
    aiContract.parmShowActivated(true);
    aiContract.parmShowStarted(true);
    aiContract.parmShowPicked(true);
    aiContract.parmShowStaged(true);
    aiContract.parmShowLoaded(true);
    aiContract.parmShowCancelled(false);
    aiContract.parmPrintCopyOriginal(PrintCopyOriginal::Original);
 
    aiController.parmReportContract().parmRdpContract(aiContract);
    //aicontroller.startOperation();
 
    //aiController.parmExecutionMode(SysOperationExecutionMode::Synchronous);
 
    // Run the report
    aiController.runReport();
}
Advertisements

One thought on “print Sales Picking List via Jobs X++ AX 2012

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s