web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

how we can add a comment to sales invoice created from job planning lines according to the MONTH of planning date [JAN,FEB] folks please help!!

(0) ShareShare
ReportReport
Posted on by

Bemerkung=comment 

3124.45f05333_2D00_6fcb_2D00_4256_2D00_9ac1_2D00_2751ecef6040.png

I have the same question (0)
  • Ben Baxter Profile Picture
    7,142 Super User 2026 Season 1 on at

    On your Job Planning Lines, set the Line Type to Billable and the Type to Text.  This will transfer as a comment line to a sales invoice the same as it does for the other types of Billable JPLs.

  • Community Member Profile Picture
    on at

    inside the job planning line line type = billable but still there is  no any value coming

    here inside JPL the line type= billable but still therer is no any  changes?

    Validation Results:
    Type must not be Text in Job Planning 

    how to resolve this?

  • Suggested answer
    Ben Baxter Profile Picture
    7,142 Super User 2026 Season 1 on at

    Do a look-up on the table data of your Job Planning Line (Ctrl + Alt + F1).  Make sure the Unit Price fields all validated with the correct amounts.  It could be the field you have displayed is not properly populating the required Unit Price fields that are transferred to the Sales Invoice.

  • Amit Baru Profile Picture
    3,043 on at

    Hi,

    Pls take reference form below code.

    [EventSubscriber(ObjectType::CodeunitCodeunit::"Job Create-Invoice", 'OnAfterCreateSalesLine''', false, false)]

        local procedure OnAfterCreateSalesLineAddCommentLine(Job: Record Job; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var JobPlanningLine: Record "Job Planning Line")
        var
            SalesLineL: Record "Sales Line";
            LineNo: Integer;
        begin
            LineNo := 10000;
            SalesLineL.Reset();
            //SalesLine.SetRange(Description, SalesLine.Description);
            SalesLineL.SetRange("Document Type", SalesLine."Document Type");
            SalesLineL.SetRange("Document No.", SalesLine."Document No.");
            if SalesLineL.FindLast() then
                LineNo := SalesLineL."Line No." + 10000;
            SalesLineL.Init();
            SalesLineL."Document Type" := Enum::"Sales Document Type"::Invoice;
            SalesLineL."Document No." := SalesLine."Document No.";
            SalesLineL."Line No." := LineNo;
            SalesLineL.Insert(true);
            SalesLineL.Type := Enum::"Sales Line Type"::" ";
            SalesLineL.Description := JobPlanningLine."Invoice Description";
            SalesLineL.Modify(true);

        end;
    Regards
    Amit Sharma
  • Community Member Profile Picture
    on at

    here the requirment is different the above mentioned code only create a blank comment line.  I need the  comment line  based on the MONTH of planning date [jan,februvary] !!! thats the problemm any suggestions?

    • JAN
    • FEB
    • MARCH

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 621 Super User 2026 Season 1

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 445 Most Valuable Professional

#3
YUN ZHU Profile Picture

YUN ZHU 366 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans