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 RMS (Archived)

User Hook to intercept the scanning of a barcode and split it into fields

(0) ShareShare
ReportReport
Posted on by 95

I am creating a barcode that looks like this: A1234-01-56789

The A1234 is the ItemLookupCode, 01 represents the week of the year the barcode label was created (00 - 52), and 56789 is an identifier.

When the cashier scans the barcode, I would like to have a user hook intercept the string A1234-01-56789 and split it into 3 fields.

I want to use the first field as the ItemLookupCode to get the description and price of the item.

For the second field, I want to calculate whether to give a discount or not.  Here's the formula:

if (current_week - barcode_week > 5) give discount.

For the third field, I want to store the contents into the TransactionEntry.Comment column.  Or, in the serial number column of the line item.  I basically want to store this identifier with the line item.

Is this possible?  If so, how much effort is it?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Antonijo Todorovik Profile Picture
    4,025 on at

    Hi DCHANG92606.

    OK, i beleive it could be done, even that You are not defining the discount.... and understanding that this is per Item.

    OK, before working on hooks (which probably will be the most complete solution, in case of complex needs...but I'm not completly sure what hook need to be used...probably  the hook used should be AddItemHook, Hook type 4 or maybe RefreshDisplay hook ??), just an idea, for simple solution: I would go for a small html screen, invoked by a Custom Button and it's there where you scan the barcode. You can apply the business logic with scirpt language and use a FireEvent PerformAddItem to add the Item and the possible discount...., not sure if You can add the item comment as You wish, but You could overwrite the description maybe??...

    What do You think?

    Kind regards, A.

  • dchang92606 Profile Picture
    95 on at

    Antonijo,

    Thanks for the quick response.  I think the AddItem hook looks promising.  I'll look into it some more.

    I need to do this using the same check out process that we currently use.  That is, I cannot change the UI to fulfill this requirement.

    Currently, when we scan a barcode, it treats the entire barcode as the ItemLookupCode.  I need to be able to parse the new barcode and give RMS the extracted value.  I also need to give a 20% discount if the formula for field 2 is matched.  This all has to happen using the vanilla UI.

    DC

  • Community Member Profile Picture
    on at

    hey, sorry for my not so clear about this topic, but i just wonder that can every type of barcode printed can be split into fields ? and which barcode scanning device is available ?

  • JesseBoan Profile Picture
    12 on at

    The additem hook is the way to go. You can create items in the database that actually set a discount for the transaction. We do that with coupons, making them barcode scannable.

    What type of barcode scanner are you using? I recently looked into automatically entering serial numbers at the POS although we haven't executed it yet. I tested  a Motorola/Symbol scanner and programmed it to parse out the barcode. Basically, we were using one long string, like this. 1234567890123456789. I set the programming to send the first 13 digits of the barcode (the EAN 13 item lookup code), the send the enter key. Since the item is serialized RMS brings up the serial number entry window. Then scanner sends the serial number (456789) and the enter key twice again, confirming both the serial number entry and the confirmation to accept a new, unrecognized serial. Based on your situation you may be able to preload the serial numbers into each item to prevent the second popup. In testing, the scanning was just as fast as scanning a standard item, you couldn't even see the windows pop up, it  scanned and you saw the item rang up with the serial number listed instantly. Granted this is only two fields and doesn't apply the discount like you are looking for, but just a suggestion as you might be able to do most of the work on the scanner side. For the Motorola/Symbol scanners, you can print out a sheet of barcodes that create the rules, so you just send that sheet to your stores, have them scan it once and you're done.

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 RMS (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans