[EventSubscriber(ObjectType::Codeunit, Codeunit::"Job Jnl.-Post Line", 'OnAfterJobLedgEntryInsert', '', true, true)] local procedure PassValue(JobJournalLine: Record "Job Journal Line"; var JobLedgerEntry: Record "Job Ledger Entry") var JobPlanningLine: Record "Job Planning Line"; begin JobPlanningLine.setrange(Job no,JobJournalLine.Job No) JobPlanningLine.setrange(Task no,JobJournalLine.Task No) JobPlanningLine.setrange(Line no,JobJournalLine.Planning Line No) if JobPlanningLine.findfirst() then JobPlanningLine.Validate(Job Journal line, JobJournalLine."Line No.");//not working for each line but header JobPlanningLine.Modify(true);
Answers