Hi sorry for a basic question on VBScript but after scouring the internet. In a If statement I am trying to assign values to 2 fields but when I run this code which is part of an application it does not error neither does it work so I suspect I am doing wrong. Can anyone point me in the right direction as I am trying to assign values to CustomerInformation.CodeObject.Customer and. CustomerInformation.CodeObject.Carrier
Function CustomerInformation_OnLoad()
if (SystemVariables.CodeObject.Company = "D" or SystemVariables.CodeObject.Company = "T") and DispatchNoteDetails.CodeObject.Area = "UK" then
if CustomerInformation.CodeObject.Customer = "AAE02" then
CustomerInformation.CodeObject.Carrier = "Customer collects" and CustomerInformation.CodeObject.CarrierURN = "AA Driver"
end if
end if
End Function
CustomerInformation.CodeObject.Carrier = "Customer collects"
in one line,CustomerInformation.CodeObject.CarrierURN = "AA Driver"
in the next line. Noand
. Two statements are required.(This is vb.Net, isn't it?) – Flakes Oct 23 '20 at 14:29And
operator is used in comparisons not for joining multiple statements together. – user692942 Oct 23 '20 at 14:49