Hi...
I am trying to create a small message script that if I change a particular field in a customer maintenance task, a message will pop up that the customer does not have a record in the A/R repetitive invoice file and it cannot be changed.
As it is, it will fire on every customer even if there is not a corresponding customer in repetitive invoice entry.
Here is what I have so far:
repinv = ""
cust = ""
custmain = ""
retVal= oBusObj.GetValue("CustomerNo$", cust)
retVal= oBusObj.GetValue("ReferenceNo",repinv)
retVal= oBusObj.GetValue("CustomerNo$",custmain)
if cust <> custmain then
retStrVal = oSession.AsObject(oSession.UI).MessageBox("No entry allowed.")
end if
The record cust is the customer from the repetitive invoice file, the custmain is the customer from the customer maintenance file.
So, for instance customer JELLCO does not have a repetitive invoice in the file. But I want the customer maintenance field I am changing on JELLCO to say "No entry allowed", but it does not. I know the script is firing, if I change the cust = custmain , but it will always show the message. So, I am pretty sure it is not retrieving the repetitive invoice customer number.
Thank you so much for any help.
B