Tracking number lookup and link to web site ship24

SOLVED

Do to the fact that iShip is no longer working, I've created an invoice tracking number script, but it is not returning the tracking number.  What am I doing wrong?

Thanks,

John

Here is the script.

'******* 1/13/2023 Tracking number lookup and link to web site ship24 *******

If oSession.CompanyCode = "ABC" Then

retval = oSession.AsObject(oSession.UI).Messagebox("""Tracking fired")

Div=""
Order=""
InvoiceNo=""
Package=""
TrackingNo=""

retVal = oBusObj.GetValue("InvoiceNo$",InvoiceNo)


msgbox "Invoice=" & Invoiceno


' **** Open Tracking Business Object *********

oTrackingBus = oSession.GetObject("SO_InvoiceTracking_bus")

if oTrackingBus<> 0 then

Set oTrackingBus = oSession.AsObject(oTrackingBus)
retval = oSession.AsObject(oSession.UI).Messagebox( "","oTrackingBus fired")

retval = oTrackingBus.SetKeyValue("InvoiceNo$",InvoicenNo)
retval = oTrackingBus.SetKeyValue("PackageNo$","0001")
retVal = oTrackingBus.SetKey()

retVal = oTrackingBus.GetValue("TrackingID$",TrackingNo)

msgbox "Invoice No = "& InvoiceNo & " Tracking No =" & TrackingNo

TrackingNo="1z91076x0362409304"        '***** testing

Link = "">www.ship24.com/tracking & TrackingNo & ""

msgbox Link

CreateObject("WScript.Shell").Run(Link)
else

retval = oSession.AsObject(oSession.UI).Messagebox( "","oTrackingBus failed")

end if


End if 'Close if not ABC company

Parents Reply
  • 0 in reply to Sage100User

    You could just use google. You get an extra click when the page opens up but depending on who you ship with it will provide a link to the tracking.

    Button script would look like this, depending on the panel the button is on

    CreateObject("WScript.Shell").Run "https://www.google.com/search?q=" & ML_TRACKING

Children