Lanham e-ship - trying to create controlled UPS return label

lisakinslisakins Member Posts: 23
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?

Comments

  • SavatageSavatage Member Posts: 7,142
    Not sure I understand what your trying to do. But if you go into a posted Misc Package or any posted package

    you can go to package->Labels->Label->Print Package Label

    You can print out the label as many times as you want.
  • lisakinslisakins Member Posts: 23
    The problem is that they want the miscellaneous package and the resultant label to automatically print out, just after the outbound label from the Pack Line scanning function has completed.

    It is getting the proper code inserted to accomplish this automation that is giving me fits.

    Thanks for the reply.
  • SavatageSavatage Member Posts: 7,142
    Again i'm unclear - As it appears to me Pack Line Scanning & Misc Package are two different things.

    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 :mrgreen: "Print Label" the code is
    OnPush()
    BEGIN
      PackingStation.TESTFIELD("Close Package Print Command");
    
      IF (PackingStation."Scale Inferface Code" <> '') AND ("Override Weight" <> 0) THEN BEGIN
        ScaleInterface.GET(PackingStation."Scale Inferface Code");
        ScaleComm.GetPackageWeight(ScaleInterface,Rec);
      END;
    
      Shipping.ClosePackage(Rec,TRUE);
    END;
    
  • lisakinslisakins Member Posts: 23
    This is why I'm confused.

    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
  • lisakinslisakins Member Posts: 23
    One other thing: They want to have the original Order populate the Description so they can cross reference any returns. The Ship-to on the return label, will be the initiator of the first package, and they want the blind ship-from to be the customer that is on the original Order.

    Wow-sa
  • SavatageSavatage Member Posts: 7,142
    It's sounding like you want to create a return label with each order regardless if it will ever be returned or not. Since UPS doesn't charge for labels that are never used. And it's a convenience to whomever is receiving an order. (is that correct?)

    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-[
  • SavatageSavatage Member Posts: 7,142
    Savatage wrote:
    It's sounding like you want to create a return label with each order regardless if it will ever be returned or not. Since UPS doesn't charge for labels that are never used. And it's a convenience to whomever is receiving an order. (is that correct?)
    [

    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 :mrgreen:
  • SavatageSavatage Member Posts: 7,142
    Brainstorming a little more...
    -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
  • lisakinslisakins Member Posts: 23
    Like the freaky tangent...good to know I'm not the only one :P

    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.
  • lisakinslisakins Member Posts: 23
    Oh....and how bout them Cowboys \:D/
  • SavatageSavatage Member Posts: 7,142
    lisakins wrote:
    Oh....and how bout them Cowboys \:D/

    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) :mrgreen:
    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 :lol:
Sign In or Register to comment.