I am new to Navision code and have managed to confuse myself thoroughly while trying to create these labels.
The user wanted to be able to specify whether a return label is used or not. I was able to get a boolean to post through the tables from the Sales Order and appear on the Pack Line Scanning form. I still haven't figured out what the Packing Control table does, as I can never catch it with data, even when a package is open on another screen. :shock:
However, now I need to create/insert the code to the UPS Transaction CodeUnit, in the ClosePackage section which will create a Misc Package and then print a second label with the //cpp function on the Pack Line Scanning form. I have completely hit a wall. There is a CodeUnit actually called Create Miscellaneous Package, which I was able to modify to get the header and no. assignment created, but inserting any reference to this in the UPS Transaction code causes errors.
At this point, I've tried so many things that I've completely confused myself. Don't suppose anyone out there has had to do this before and can lend some guidance?
0
Comments
you can go to package->Labels->Label->Print Package Label
You can print out the label as many times as you want.
http://www.BiloBeauty.com
http://www.autismspeaks.org
It is getting the proper code inserted to accomplish this automation that is giving me fits.
Thanks for the reply.
You use pack line scanning when there is an order in the system.
& Misc package you can manually create a shipping label for anything.
for my Misc packages I need sometimes a few labels so I don't want it to post "just print" so I made a command button called
obviously
http://www.BiloBeauty.com
http://www.autismspeaks.org
I would have thought I could simply jump into the Label Management function and create the code for the additional (return) label. However, upon quesioning Lanham said the only way to issue the labels with a tracking number would be to create a miscellaneous package for the return label. The users do not want to do this by hand.
I'm therefore trying to force one function (Create Miscellaneous Package) to run within another (Pack Line Scanning), resulting in two labels with UPS tracking numbers.
Being new to this code and totally unfamiliar with Lanham isn't helping.
Thanks
Wow-sa
just as a note to this post..
What we do is send a return label in the mail when a customer requests one. But to make it easier to create one I created a new tab just for return labels that has just the info the user needs to enter.
1)I created a phony vendor # 999999 (which is baciscally our home address here)
2)They type in the letter U - which brings up "UPS" //could make it default if you wish
3)Click the Double Blind Shippend box
4)Enter the customer that wants to return something
5)Enter Approx Weight of return and an ra# & comment
6)Click "Print Ship Label" & "Click Post Package"
It really takes just seconds to create return label for us.
see here
http://savatage99.googlepages.com/SampleReturnTab.JPG
Another thing we added..
Was since the customer No & Double blind shipment are on every Return Label Created.
When thy click the command button and open the form it shows just THAT customers return labels and by clicking on the label it brings you to the ups website & tracks it.
you can basically create a command button on the customer card with filter to table 14000714 with RunFormLink of..
Double Blind Ship-from Cust No=FIELD(FILTER(No.))
I think I went off in some freaky tangent 8-[
http://www.BiloBeauty.com
http://www.autismspeaks.org
Ok so the basic goal here is
*at the end of Scanning an order using "Pack line Scanning" on //CPP (close-package-print) you want to somehow create a seperate Misc package label
*using that customers # as the double blind shipment #
*and the order# (inv # not available yet at this point) is put into the description field of the label.
*then after all that it should print out automatically.
:?:
My first step would put on codecoverage - create a misc package and see what steps nav takes from beginning to end. Then make some kind of function or codeunit that be executed after //cpp.
Dallas? GGGGGG-Men! Go Giants
http://www.BiloBeauty.com
http://www.autismspeaks.org
-You would have to Access the NoSeriesManagement - to keep updating to the next package #
-You then have to populate the Package Table (14000701) with the proper data (Create 1 return label) & see which fields need filling in.
-then it passes thru codeunits (14000701) Shipping & (14000761) UPS Transaction to get a new valid tracking #.
Doesn't sound like alot of fun
http://www.BiloBeauty.com
http://www.autismspeaks.org
I was trying to shortcut the need for the number series and getting the tracking number, etc by grabbing the (as best I can tell with Code tracing) unused "Create Miscellaneous Package" codeunit. I modified the first few lines and was able to get a misc package created, no. assigned properly, default to location-MAIN which creates the "to" as the customers main warehouse...so about half way there, but I can't insert it to the area that Lanham said was the appropriate spot for the modification.
I like the idea of a tab because that gives a bit more control to what I'm doing and I can then just modify specific pieces of code as the form/function are stepped through.
Let me give this idea a run and see what happens.
Thank you for your help and I'll let you know if this accomplishes the goal.
Arrrgh!
Anyway I guess using the order# or something as the package# might be away to bypass using the NoSeriesManagement. As long as it's unique for each order.
*Note for the example form pic above - when you have lazy users (like me) You can set the MaxLength, AutoEnter & Next Controls.
Like when you type "U" for UPS.
I set the Maxlength to 1
Autoenter to YES
NextControl to the field below.
Then just by typing U it all gets filled out an automatically moves to the next field (one less click)
Plus you can do it to the Vendor# & cus#'s too, if your vend & cust #'s are set lengths. Now your already eliminating 3 clicks. Which lazy users like
http://www.BiloBeauty.com
http://www.autismspeaks.org