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!
0
Answers
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.
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);