AnsweredAssumed Answered

Privilege set

Question asked by GregR on Apr 4, 2013
Latest reply on Apr 17, 2013 by GregR

Title

Privilege set & GetField value (OnObjectSave)

Post

     I have a order type layout (Order Header ) that contains a portal.

     The portal contains order lines (Order Line).

     Each line can create entries in a table that are related to size (Order Line Size). These are accessed by aliases ( e.g. Order Line Size 8 ).

     If I login with a user with a privilege set the same as [Full Access] then there is a problem the $Quantity in the OnObjectSave event script.

     If I login with [Full Access] then there is no problem.

     After entering a value (OrderQuantity) in the size (not pressing Enter or Tab) and then selecting a button using the mouse that runs a script outside of the portal then the following occurs.

     Note: If I click into a field (not a button) then there is no problem.

      

     OnObjectValidate calls a script to validate the entry (with in a quantity range depending on the type of order and size).

     Values checked after the following line has executed -

          Set Variable ( $Quantity ; GetField ( $SourceTable & “::OrderQuantity” ) )

     see attachment  - first for data values

     Note: the value for $Quantity

      

     OnObjectSave calls a script to maintain some Order & Customer quantities.

     Values checked after the following line has executed -

          Set Variable ( $Quantity ; GetField ( $SourceTable & “::OrderQuantity” ) )

     see attachment - second data values

     Note: the value for $Quantity

      

     Note: The GetField problem not only occurs with OrderQuantity  but with any field in the relevant Order Line Size table.

     I'm guessing the problem has something to do with the creation of the "Order Line Size" row which appears to happen between the validate and save events.

     Any help appreciated.

Validate%2C_Save%2C_Code.JPG

Outcomes