When we save an order, we have a macro within the program that makes the packlist number the same as the order number (PACKLIST_ID = ORDER_ID). It just makes things easier to find that way. When items are backordered, the program can backorder to a new order with a -1, -2, etc behind it. (i.e. when order 133492 has something backordered, the backorder becomes 133492-1. If -1 has a backorder, that backorder becomes -2, and so on. So when the backorder is saved after shipping it, the packlist number gets the -1, etc.
However, when you introduce a delivery schedule (items are to be shipped at certain dates in the future, say one shipment today, another a month from now) this cannot be done. So when you backorder an order with a delivery schedule, it does not do -1, -2. It stays the same order. This is by design of the program. Which makes me wonder if this particular feature can be changed, but I'll continue on the assumption it cannot. Thus, as a result, a month from now, when we ship the second part of the delivery schedule on an order, the macro will try to make the packlist number the same as the order number. This cannot happen, because that packlist number was already taken when it was shipped the first time. It won't save because of this error. I have to go in and manually delete the macro, put in my own packlist number, save it, then reenter the macro. This is nothing short of a nuisance. I don't want all my guys to have to remember how to do this. That just won't happen.
This program utilizes VBScript in its macro system. What I want it to do is basically what the program already does when it backorders. I would like it to perform a check to see if the PACKLIST_ID already exists, and if it does, to add a -1, and if that already exists, make it -2, etc.
If it's a simple fix, I'll humbly ask if anyone is able to write me up something. If it isn't as simple as I think it is for someone with experience in VBScript, then let me know, and I'll withdraw my request. Let me know if you need more information.
Thanks in advance for any advice and help,
WIN or LEARN.
I've been using vbscript for a while, mostly because I work for large company that has remained using windows XP and XP doesn't have powershell built in it so it's easier to use vbscript. However if you want people to help you, you must post your vbscript on here.