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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Codeunit does not contain a definition for 'SalesInvoiceInterDocType'

(5) ShareShare
ReportReport
Posted on by 48
while updating to 24 i am getting this error 
error: 
'Codeunit Microsoft.CRM.Segment.SegManagement' does not contain a definition for 'SalesInvoiceInterDocType'ALAL0132
 
code:
trigger OnPostReport()
    begin
        if LogInteraction and not IsReportInPreviewMode then
            if "Sales Invoice Header".FindSet then
                repeat
                    if "Sales Invoice Header"."Bill-to Contact No." <> '' then
                        SegManagement.LogDocument(
                         SegManagement.SalesInvoiceInterDocType, "Sales Invoice Header"."No.", 0, 0, DATABASE::Contact,
                          "Sales Invoice Header"."Bill-to Contact No.", "Sales Invoice Header"."Salesperson Code",
                          "Sales Invoice Header"."Campaign No.", "Sales Invoice Header"."Posting Description", '')
                    else
                        SegManagement.LogDocument(
                         SegManagement.SalesInvoiceInterDocType, "Sales Invoice Header"."No.", 0, 0, DATABASE::Customer,
                          "Sales Invoice Header"."Bill-to Customer No.", "Sales Invoice Header"."Salesperson Code",
                          "Sales Invoice Header"."Campaign No.", "Sales Invoice Header"."Posting Description", '');
                until "Sales Invoice Header".Next = 0;
    end;
I have the same question (0)
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,150 Super User 2025 Season 2 on at

    Hope this might be helpful:

    The error "Codeunit Microsoft.CRM.Segment.SegManagement' does not contain a definition for 'SalesInvoiceInterDocType'" in BC24.x means that SalesInvoiceInterDocType has been removed or refactored from the SegManagement codeunit. You must consult Microsoft's official documentation for BC24.x to find the new or replacement method (likely an Enum) for specifying the Sales Invoice document type when logging interactions.

    ✅ Mark this answer as verified if it helps you.

  • Gerardo Rentería García Profile Picture
    25,390 Most Valuable Professional on at
    Hi
    Do you have access to the communications that have come to you with extension incompatibility issues?
    best
    GR

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,116

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 764 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 635 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans