ItemJournalLine.INIT; ModifiedTime := FORMAT("Modified On"); Pos := STRPOS(ModifiedTime,' '); ItemJournalLine."Document No." := Item."No." + ' ' + DELSTR(ModifiedTime, 1, Pos); ItemJournalLine."Posting Date" := TODAY; ItemJournalLine."Entry Type" := ItemJournalLine."Entry Type"::Purchase; ItemJournalLine."Item No." := Item."No."; ItemJournalLine.Quantity := Inventory; ItemJournalLine."Quantity (Base)" := Inventory; ItemJournalLine."Gen. Prod. Posting Group" := Item."Gen. Prod. Posting Group"; ItemJournalLine."Gen. Bus. Posting Group" := IntegrationSetup."Gen. Bus. Posting Group"; CODEUNIT.RUN(CODEUNIT::"Item Jnl.-Post Line",ItemJournalLine); MODIFY; COMMIT;
Answers
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.