When inserting a record through codeunit is it possible to automatically run the coding behind. For example in a sales header once the sell-to customer no is entered it is automatically retrieved the address along with vat no. and other info. Can this be achieved even when inserting through codeunit?
0
Comments
Rec.INSERT(TRUE); --- instead of --- Rec.INSERT;
And
VALIDATE(Rec.Field, 'NewValue'); --- instead of --- Rec.Field := 'NewValue';
Thanks for your prompt reply. I will test it out and let you know whether it works properly.
Good evening.
I have got an issue with an insertion through validate. I am trying to use validate on a locatiop code in the Sales Header and it is not working. I am assuming that this is because it prompts a message which the user is to confirm. Is it possible to skip this step and force an insertion?
Please don't go for the force insertion through the code in the location code. But use the validate as suggested. If possible use the debugger to see if the code that you have writtent is triggering or not.
For any queries you can also visit my blog site: http://msnavarena.blogspot.com/