Hey,
I have a issue with sales lines and events.
i have a event function that listens to onValidate trigger for No field in Sales Line table.
When No is inserted, the event executes some code. Anyway, my problem is with sales line Line no. The line no is not inserted at the time the No is inserted,
and my code needs to know the line no.
is there any other solutions/workarounds that can / is possible to solve this.?
The solution will be a extension, and therefore, i cannot change any standard page/table property.
0
Answers
If you need the "Line No." it looks for me that you are trying to insert a data in some other table, and link it to the Sales Line. If it is the case then imho OnBeforeValidate/OnAfterValidate is not the best event to subscribe for. This is because an user can change the content of No. field a few times withour actually storing the change in the databas, and if you subscribed to OnBeforeValidate/OnAfterValidate you would be writting/updating unnecessary data, as the source Sales Line won't be in ther database yet a the time when your subscriber code will execute.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03