BOI During Daily Sales Reports & Updates

SOLVED

I have a simple script that updates a UDF in AR_Customer. The script is a Table Pre-Write event on AR_Customer.
It works perfectly when editing a customer record in Customer Maintenance.
It does not work though when the Daily Sales Reports & Updates are run. That process does edit the AR_Customer records, but the script simply won't run.

Why would it run fine in one scenario, but not the other?

If anyone has ideas, it would be much appreciated!


Here is my script:
r = 0
PriceLevel = ""
If oSession.UserCode <> "ORO" Then
r = oBusObj.GetValue("PriceLevel$",PriceLevel)
If PriceLevel = "1" or PriceLevel = "4" Then
r = oBusObj.SetValue("UDF_SendToOro$","Y")
End If
End If

Parents
  • 0

    Simple answer is that journal/register updates do not trigger *-write event scripts.

    I can't remember specifically, but while experimenting a while back, i think i recall seeing either a pre or post delete event script triggered on either the SO_SalesOrderHeader, SO_SalesOrderDetail, SO_InvoiceHeader, or SO_InvoiceDetail table when doing an update one time.

    So you might be able to experiment with it and it would just mean that if a customer exists more than once on an invoice, your script would be triggered for each one.

  • 0 in reply to David Speck

    I'd try a pre-validate column trigger... perhaps date of last activity (or something like that).  I've done something similar for updating SO by script, as invoices are posted (last invoice number).

Reply Children