Hi everyone,
I'm finding a problem finding the event where I can set the "job Task No." before the insert of the registry.
In a job card, when I'm trying to create a Job Task, I want to create it without setting the Job Task No, which I want to be filled when inserting, adding for example, the date. Which event can I sue fro this purpose? I'm trying to use the events from the "Job Task" table, but I can't find the correct way.... Is possible to develop this with extensions?
Thank you very much
0
Comments
Try checking the posting codeunits, it should be possible quite sure
Hi @RobyR
No, the idea is to inserte the value into the Job Task (table 1001)
In the job card, I try to create a new line. I don't fill the "JobTaskNo", and when NAV tries to insert the new registry, I get the error, telling that I must fill the JobTaskNo. So, I think that the best event should be "OnbeforeInsertEvent", and i coded like this:
But I still having the same issue, probably because i am using "Rec", and this rec doesn't exist, because the insert is not done yet...
Thnks for your answer, but still having the same issue. The error notification appears even before the break I added for debugging:
Try to set it to false and check if this solve the issue
I've simplified the code like this, just to show a message in the event:
But the error notification appears before my message, so, the validation is made before the "OnBeforeInsertEvent"...