web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Print shipping label automatically for each order line in picking list registration form once the cursor moves to the next line

(0) ShareShare
ReportReport
Posted on by

Hello!

 

In picking list registration form, within “Lines” tab, we have a custom field. The worker has to enter the picked quantity in that field to make sure it matches the ordered quantity. A custom method will throw a notification box if the quantity picked is incorrect.

 

Once the worker has moved the mouse cursor to the next line, I need the system to automatically print the shipping label for that line in order to avoid any mistake in labeling dispatched items.

 

The default shipping label is not useful. It only shows the sum of quantity packed, along with shipping details. The other issue with default shipping label is that we cannot print the labels for each individual order line through picking list registration form.

 

I have created a custom shipping report by utilizing AOT report wizard and it works just fine.

 

In short, the worker enters the quantity picked into a custom field in picking list registration form. The question is how I can make the system to automatically print the shipping label for that line only, using my custom report once the worker leaves that custom field.

 

Any help with this would be greatly appreciated.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    I just managed to write the below method on WMSOrderTrans table. Now when I modify and leave field “Weighed grams”, the system prints the shipping labels automatically. However, it prints all lines together.

     

    How can I make it to print only the current line?

    public void modifiedField(FieldId _fieldId)
    {               
        Args                args;
        MenuFunction        menuFunction;
        WMSOrderTrans       wmsordertrans;
            
        super(_fieldId);
        switch(_fieldId)
        {
            case fieldNum(WMSOrderTrans,WeighedGrams):

            args = new Args();
            args.record(WMSOrderTrans);
            
            menuFunction = new MenuFunction(menuitemoutputstr(HighsunShippingLabels), MenuItemType::Output);
            menuFunction.run(args);
    break;
                
        }
    }

    2642.2.jpg

    2642.2.jpg

  • Community Member Profile Picture
    on at

    Guys, any suggestions? If someone gives me a clue what method and where I should write, I’ll figure the rest out on my own.

  • Verified answer
    Community Member Profile Picture
    on at

    Never mind! I found a workaround myself:

    On WMSPickingRegistration form line grid

    public int mouseDblClick(int _x, int _y, int _button, boolean _Ctrl, boolean _Shift)
    {
        Args                args;
        MenuFunction        menuFunction;
        ReportRun           reportrun;

        int ret;
        ret = super(_x, _y, _button, _Ctrl, _Shift);

        args = new Args();
        args.name(reportStr(Admin_Report));
        args.parm(WMSOrderTrans.inventTransId);
        reportRun = new ReportRun(args);
        reportrun.report().interactive(false);
        reportrun.query().interactive(true);

       SysQuery::findOrCreateRange(reportrun.query().dataSourceTable(tablenum(WMSOrderTrans)), fieldnum(WMSOrderTrans, InventTransId)).value(queryValue(WMSOrderTrans.inventTransId));
        reportRun.init();
        reportRun.run();

        return ret;
    }

    On the report:

    public void init()
    {
    try
    {
    if(element.args().parm())
    {
    this.query().dataSourceTable(tablenum(WMSOrderTrans)).addRange(fieldnum(WMSOrderTrans,inventtransid)).value(element.args().parm());
    inventtransid = element.args().parm();
    this.query().userUpdate(false);
    this.query().interactive(false);
    super();
    }
     element.deviceName("Datamax-E4203");
     element.unpackPrintJobSettings(SalesFormLetter::getPrinterSettingsFormletter(DocumentStatus::Invoice,PrintSetupOriginalCopy::Original));
    }
    catch(exception::Error)
    {
    info("Error in report init");
    }
    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans