To implement this hotfix, you must have a developer license.
You do not have to have rights to the data stores unless you have to perform data repair.
...
ServLedgEntry."Document No." := ServHeader2."No.";
ServLedgEntry."Serv. Contract Acc. Gr. Code" := ServContractHeader."Serv. Contract Acc. Gr. Code";
ServLedgEntry."Bill-to Customer No." := ServContractHeader."Bill-to Customer No.";
ServLedgEntry."Customer No." := ServContractHeader."Customer No.";
ServLedgEntry."Ship-to Code" := ServContractHeader."Ship-to Code";
//Delete the following lines.
ServLedgEntry."Global Dimension 1 Code" := ServHeader2."Shortcut Dimension 1 Code";
ServLedgEntry."Global Dimension 2 Code" := ServHeader2."Shortcut Dimension 2 Code";
//End of the lines.
ServLedgEntry."Entry Type" := ServLedgEntry."Entry Type"::Sale;
ServLedgEntry."User ID" := USERID;
ServLedgEntry."Contract Invoice Period" := FORMAT(ServContractHeader."Invoice Period");
ServLedgEntry."Contract Group Code" := ServContractHeader."Contract Group Code";
ServLedgEntry."Responsibility Center" := ServContractHeader."Responsibility Center";
...
...
ServLedgEntry."Document No." := ServHeader2."No.";
ServLedgEntry."Serv. Contract Acc. Gr. Code" := ServContractHeader."Serv. Contract Acc. Gr. Code";
ServLedgEntry."Bill-to Customer No." := ServContractHeader."Bill-to Customer No.";
ServLedgEntry."Customer No." := ServContractHeader."Customer No.";
ServLedgEntry."Ship-to Code" := ServContractHeader."Ship-to Code";
//Add the following lines.
ServLedgEntry."Global Dimension 1 Code" := ServContractHeader."Shortcut Dimension 1 Code";
ServLedgEntry."Global Dimension 2 Code" := ServContractHeader."Shortcut Dimension 2 Code";
//End of the lines.
ServLedgEntry."Entry Type" := ServLedgEntry."Entry Type"::Sale;
ServLedgEntry."User ID" := USERID;
ServLedgEntry."Contract Invoice Period" := FORMAT(ServContractHeader."Invoice Period");
ServLedgEntry."Contract Group Code" := ServContractHeader."Contract Group Code";
ServLedgEntry."Responsibility Center" := ServContractHeader."Responsibility Center";
...
...
ServLedgEntry.Amount := ServLedgEntry."Amount (LCY)";
ServLedgEntry."Posting Date" := DueDate;
ServLedgEntry.Prepaid := TRUE;
ServLedgEntry.INSERT;
DocDim.RESET;
DocDim.SETRANGE("Table ID",DATABASE::"Service Header");
DocDim.SETRANGE("Document Type",DocDim."Document Type"::Invoice);
DocDim.SETRANGE("Document No.",ServHeader2."No.");
DimMgt.MoveDocDimToLedgEntryDim(
...
...
ServLedgEntry.Amount := ServLedgEntry."Amount (LCY)";
ServLedgEntry."Posting Date" := DueDate;
ServLedgEntry.Prepaid := TRUE;
ServLedgEntry.INSERT;
//Add the following lines.
DimMgt.DeleteDocDim(DATABASE::"Service Header",2,ServHeader2."No.",0);
ServContractDim.RESET;
ServContractDim.SETRANGE("Table ID",DATABASE::"Service Contract Header");
ServContractDim.SETRANGE(Type,ServContractHeader."Contract Type");
ServContractDim.SETRANGE("No.",ServContractHeader."Contract No.");
DimMgt.CopySCDimToDocDim(ServContractDim,DATABASE::"Service Header",2,ServHeader2."No.",0);
//End of the lines.
DocDim.RESET;
DocDim.SETRANGE("Table ID",DATABASE::"Service Header");
DocDim.SETRANGE("Document Type",DocDim."Document Type"::Invoice);
DocDim.SETRANGE("Document No.",ServHeader2."No.");
DimMgt.MoveDocDimToLedgEntryDim(
...