@Alnoor Cassim , thanks for the tip. I did have some bad start checking going on because I just put that on all of them now, so I turned that off, but it still isn't working.
It works on manually added invoices as Table Pre-Write or Pre-Totals. I also tried Post-Write, Column PreValidate & Column PostValidate on Customer No.
I also tried with & without retval = oBusObj.Write()
Here is my script. Its pretty basic & easy; its just not liking StarShip.
'BadStart = 0
'BOI = oSession.ObjectInterface
'InUpdate = oSession.Updating
'Security = oBusObj.SecurityAccess
'StartProgram = Trim(UCase(oSession.StartProgram))
'If Right(StartProgram, 3) = "_UI" Then UI = 1
'If (BOI > 0 or InUpdate > 0 or Security = 0) Then BadStart = 1
'If BadStart <> 1 Then
If oSession.CompanyCode = "PEM" Then
sCustomer = ""
sPrintFlag = "N"
retVal = oBusObj.GetValue("CustomerNo$",sCustomer)
If sCustomer = "1003400" or sCustomer = "1003533" or sCustomer = "4422C" then
retVal = oBusObj.SetValue("PrintInvoice$",sPrintFlag)
End If
End If 'Company check
'End If 'Bad Start check
------------------------------
Dana Young
Lehman Wesley & Associates
Lansing MI
------------------------------
Original Message:
Sent: 03-19-2020 22:33
From: Alnoor Cassim
Subject: Script with StarShip
When Starship BOI creates the invoice does your script possibly fire off but then exit prematurely because you have some exit conditions (what I've called BadStart conditions in the class script samples) that would prevent it from executing further? For example let's say you are limiting the meat of script to only run when:
If oSession.StartProgram = "SO_INVOICE_UI" 'for Shipping Data Entry it's actually SO_SHIPPING_UI
If oSession.ObjectInterface = 0 'OK unless a BOI app like Starship is creating your invoice
Maybe you can post a code snippet. Also tell us which event you're using in case it's a timing thing.
------------------------------
Alnoor Cassim
Accounting Systems, Inc. (ASI)
Email: alnoor@asifocus.com
Orange County, CA
------------------------------