Basically I need part of the code in my ValidateLine to only run when adding a new line item (not when editing one)
r
rustyshackles
06/28/2017, 1:23 PM
jen: Have you tried using the Line Init event then check if the item field is blank to determine that it is a new line. Line Init should trigger when the user selects a line item regardless if it is new or an existing one.
j
jen
06/28/2017, 3:20 PM
I need something to happen as part of ValidateLine for this item though, and by that point the item field will not be blank
z
zackb
06/28/2017, 7:16 PM
Can you run it post sourcing on the item field? Or are you changing items on lines after then are added?
r
rustyshackles
06/30/2017, 12:16 AM
What I as thinking was, you have a function on the Line Init that checks if there is already an item on the line or not. If there is set the global variable to 'Edit' and if not 'Add'. Then on your validate line function you can check the value of the global variable.