See plugin attached.
I want to get the SOH at the time when a new transfer line is added. I have created a custom field to save the value.
I'm using the event Line.Added.
The plugin appears to get the SOH when each transfer is read from the database. So if I am looking at old transfers and using the back/forward buttons the plugin is getting the SOH as at now.
I don't want it to do this. I need the figure to remain fixed as at when exactly the line was added as a new line, and only then.
So effectively old transfers (prior to this plugin) should all show a 0 for SOH.
What event should I use to ensure my code is only fired when a new line is added?