Is there a way in a client script to tell a new li...
# suitescript
n
Is there a way in a client script to tell a new line was generated by the Copy Previous button? My goal is to set a particular field on the newly copied line. The operation context variable for sublistChanged only seems to have 'remove' and 'commit'.
r
Have you tried using the line init event
n
No, but I don't see how I could distinguish the creation of a new empty line and the copying of an existing line.
r
Empty line wont have Item field populated while copied line will have it, that's one way I can think of distinguishing between new and copy
n
I'll give that a shot.
lineInit is also triggered when selecting an existing line, though I can ignore those by checking for the existence of uniquelinekey
r
Yeah, forgot about that