Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

How to call modify method when barcode is scan on warehouse device?

Posted on by 681

Hi,

I have been working on one requirement which should do some operation when product barcode is scanned, but user is not required to press any button. If they scan a barcode from label it should automatically perform the operation. This I need to do while Purchase order receiving and I know WhsWorkExecuteDisplayLoadItemReceiving class should be used but even after hard try I couldn't get how to call modify method on textbox?

  • Suggested answer
    zeeshan.shaikh Profile Picture
    zeeshan.shaikh 681 on at
    RE: How to call modify method when barcode is scan on warehouse device?

    Hi Nikolaos,

    I have achieved it by adding below code in createTextBox method of class WhsWorkExecuteForm.

    if(this.elementName(_textBox) == #ItemId)

    {

           stringControl.registerOverrideMethod(methodStr(FormStringControl,modified),methodStr(WHSWorkExecuteForm,DynamicButtonControl_modified),this);

    }

    Which calls my DynamicButtonControl_modified method. Do you have any other better solution?

  • zeeshan.shaikh Profile Picture
    zeeshan.shaikh 681 on at
    RE: How to call modify method when barcode is scan on warehouse device?

    Hi Nikolaos,

    That's fine but where to add this modified method to put my logic?

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: How to call modify method when barcode is scan on warehouse device?

    Your scanner should have a setting that controls whether the scanner sends a line break (enter) after each scan. If it sends a line break, it works exactly like you would type a value with your keyboard and hit enter. This will trigger the modified method.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,986 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans