Hey,
I'm trying to insert a new sales Line programmatically. However, I'm a bit lost on where should the code be written. I tried on Onvalidate trigger for No field.
and Oninsert trigger. But neither of those two worked. I used setrange, init, and some fields, but nothing happened.
0
Answers
document no., line no. document type insert
etc
etc
etc
modify;
when salesline1 is created.
then automatically salesline2 should be inserted.
it should have the same values as salesline1, but only number should be different: For example:
no. 1000
no.1100 < new line.
think about the consecuences of doing it in oninsert and onmodify triggers. Oninsert means in each new line created by the user (maybe program flow too) another line will be created.
More important, in onmodify trigger means that every modification will suposse an error or a modification of another line. (error if u cant save the objective line in a new field)
Moreover u have to think that if u make automatically u can be modifying the functionality of the standard in ways u dont want