Column Post Validate Event Trigger Issue

SOLVED

Hello Sage Community,


I am having an issue with a Column Post-Validate event on the Sales Order Detail screen that I'm hoping someone can help me with.

My goal is to have a user-defined script execute on on the Column Post-Validate event of the "PriceLevel" field on the Sales Order Detail screen. The interesting problem I am having is that despite setting up the script to run on the aforementioned event, it instead runs whenever ANY field is modified, rather than just the Price Level field. Another interesting twist, is this problem only occurs if the PriceLevel field is blank. If there is a value assigned to PriceLevel, then the script runs as intended. For most of our orders, we leave the PriceLevel blank so that items default to our standard unit prices. Because of this, my UDS is running when it shouldn't be an I can't come up with an explanation as to why. We only want the UDS to execute when PriceLevel is actually edited.


If anyone can shed some light and offer some advice for this issue, it'd be greatly appreciated.

Thanks in advance!

Brad

Parents
  • 0

    I can't shed any light on why it is running when it is not supposed. Just to hazzard a guess, it might have to do with an null value vs. and empty string.

    My suggestion would be to add an if statement to your script and if the price level is nothing or empty, then exit the script, otherwise continue processing the script. (In case you didn't know it already, the variable `value` is assigned the colum value in column post-validate scripts.)

    Example:

    If value = "" Then

       Exit Sub

    End If

    ' handle price code here

  • 0 in reply to dlech

    Interesting issue. It is triggering at the time when the Table Pre (or Post) Validate event should trigger and is in conjunction with other (than the Price Level) fields have been modified.

Reply Children