Options

Compile error table 112 - When the function is called, the min number of parameters should be used..

stefanbstefanb Member Posts: 15
We are upgrading from nav2015 to nav2016. After importing the application objects file into our existing organization database we get an error while compiling all objects.

Table 112 Sales Invoice Header

When the function is called, the minimum number of parameters should be used. For example:

MyFunc( .. , .. , .. )
ROUND(MyVar)
ROUND(MyVar,0.05)

Anyone know a solution?

Thanks!

Answers

  • Options
    nick_robbonick_robbo Member Posts: 49
    You need to have .txt export files of the Sales Invoice Header object from both 2016 & 2017. Compare them in a merge tool, so you can see what functions have changed. Or you could just open the object designer, and try to Compile the object. It will show you where the incorrect parameters are being passed.
  • Options
    Tina_MenezesTina_Menezes Member Posts: 12
    Hi,
    Is it a dotnet variable which is showing this error?
    Then you have to first manually select the dotnet variable subtype from the list as it may be referring to old version of NAV, not the upgraded one. Then you can compile the object and check if the error still persists.
  • Options
    stefanbstefanb Member Posts: 15
    Hi Robbo,

    When I compile the object in object designer the code editor will open and jump to the following line of code. (there is a small red line under the semicolon at the end)

    Line 510;
    DocumentMailing.EmailFileFromSalesInvoiceHeader(SalesInvoiceHeader,ServerAttachmentFilePath);

    The codeblock is:

    Line 506 - 510;
    LOCAL SendReport(ReportId : Integer;VAR SalesInvoiceHeader : Record "Sales Invoice Header")
    ServerAttachmentFilePath := COPYSTR(FileManagement.ServerTempFileName('pdf'),1,250);
    REPORT.SAVEASPDF(ReportId,ServerAttachmentFilePath,SalesInvoiceHeader);
    COMMIT;
    DocumentMailing.EmailFileFromSalesInvoiceHeader(SalesInvoiceHeader,ServerAttachmentFilePath);

    I checked the code for this object in NAV2015 but I can't find no changes. See code below for NAV2015.

    LOCAL SendReport(ReportId : Integer;VAR SalesInvoiceHeader : Record "Sales Invoice Header")
    ServerAttachmentFilePath := COPYSTR(FileManagement.ServerTempFileName('pdf'),1,250);
    REPORT.SAVEASPDF(ReportId,ServerAttachmentFilePath,SalesInvoiceHeader);
    COMMIT;
    DocumentMailing.EmailFileFromSalesInvoiceHeader(SalesInvoiceHeader,ServerAttachmentFilePath);
Sign In or Register to comment.