Checking if Ship Date is past due when Creating Packing Lists

SOLVED

When opening a Sales Order # in Shipping Data Entry, I'd like there to be a message box if today's date is past the ship date of the order. I grabbed this code off of a previous question I asked in this forum and figured I could use most of it for my problem. I just don't know what UDT I should put the script in, or what event should trigger the script, if this code would even work in the first place. I have next to no experience with any of Sage's BOI so if anything seems unclear I'm happy to try and clarify. Thanks.

retVal = 0

sShipDate = ""

retVal = oBusObj.GetValue("ShipExpireDate$", sShipDate)

if oSession.UI <> 0 and d < Date() then
	
	retVal = oSession.AsObject(oSession.UI).MessageBox("Ship Date is Past Due")

end if