Skip to main content

Lasernet FO Connector 6.21 New Features and Fixes - News / Lasernet FO Connector / Lasernet FO Connector New Features - Formpipe Support Portal

Jun 5 2024

Lasernet FO Connector 6.21 New Features and Fixes

Authors list

Release version: 6.21

Release date: 5th June 2024

Introduction

This page describes the enhancements and fixes in Lasernet FO Connector 6.21.

Click to view the Lasernet FO Connector 6.21 Release Notes.

Click to view the Models and Prerequisites page.

Enhancements and Fixes - Lasernet FO Connector 6.21

Lasernet FO Connector 6.21 is a quality update released for Dynamics 365 for Finance and Operations 10.0.37 (PU61), 10.0.38 (PU62), 10.0.39 (PU63), and 10.0.40 (PU64).

The same code is used across all versions.

426009@LAC365FO – Error message for non-existing fields in Driect SQL

In Lasernet FO Connector 6.21, the following error occurs when importing a Direct SQL, which contains fields that do not exist in the system to which the Direct SQL in being imported:

Error

In DirectSQL statement field PurchLine.NonExistingField not found in the system, adding PurchLine.RecId instead

425710@LAC365FO – Error message: “Object reference not set to an instance of an object”

When verifying the parameters for a batch task that was generated with Top picking, the following error occurred:

Error

Object reference not set to an instance of an object.

This has now been fixed.

425583@LAC365FO – Error message: "Value cannot be null"

Some reports/customized reports only use print management, which can cause problems when comparing PDFs in checkpoints and when the checkpoints are part of a test flow.

In previous versions, the flow would stop when the following error occurred:

Error

Value cannot be null.

Checkpoints with PDF comparison are useful because they can automatically compare PDF files before and after an upgrade.

In previous versions, including checkpoints in a flow would create a single starting point for different and multiple reports.

This has now been fixed.

425421@LAC365FO425313@LAC365FO – Expression editor confuses single and double-quoted strings

In previous versions, the Expression editor did not allow the use of an apostrophe.

Some languages, such as Swiss (de-ch), use an apostrophe (’) as the group separator for numbers. Therefore, it is helpful to be able to use it in an Expression.

This is now fixed.

Example:

425348@LAC365FO – It is not possible to add images to predefined destinations

In previous versions, it was not always possible to add an image to the email body (HTML). This was a problem especially if an image was already included.

The image icon did not work.

This has now been fixed.

423456@LAC365FO – An issue arises when the file name of an image within a report starts with a number

In previous versions, if a report contained an image whose file name started with a number, the following error occurred while running the report:

Error

Name cannot begin with the '1' character, hexadecimal value 0x31. Line 1, position 75973. at Dynamics.AX.Application.LACUtils.`Global_StackInfo(XppPrePostArgs _args) in xppSource://Source/Lasernet\AxClass_LACUtils.xpp:line 1401 at Dynamics.AX.Application.LACUtils.Global_StackInfo(XppPrePostArgs _args) at Microsoft.Dynamics.Ax.Xpp.XppPrePostDelegate.Invoke(XppPrePostArgs args) at Dynamics.AX.Application.Global.`error(String txt, String helpUrl,

Example:

This has now been fixed.

423352@LAC365FO – Method for BOM Explosion within Lasernet Tutorial (source code) and Lasernet FO Connector (binary)

The following two examples illustrate how to “explode” Projects and Bill of materials (BOM) from the coding framework within Lasernet FO Connector.

Both examples use a context method to fill a tmp table.

This tmp table can then be used to link and retrieve additional information (fields) from other tables.

This approach allows users to add additional data from other tables, ensuring the best possible performance and low memory consumption.

Explosion of Projects

By selecting the option highlighted in the following image, the system will automatically create the Query LACTutorialProjTableExplode and then display it within the reports list page.

Query LACTutorialProjTableExplode:

Tmp table LACExplodeTmp can be linked to other tables, such as ProjTable_Sub.

The data in the table LACExplodeTmp is filled through the method LACExplodeTmp_ByProjTable().

The following is the result of generating the report for a Project:

Explosion of BOM (Bill of materials)

The approach used for the “explosion” of BOM (Bill of materials) is similar to the one used for Projects.

By selecting BOM explode report (LACTutorialBOMTableExplode), the system will automatically create and display the Query LACTutorialBOMTableExplode within the reports list page.

Query LACTutorialBOMTableExplode:

Tmp table LACExplodeTmp can be linked to other tables, such as InventTable_SubBOM.

The data in the table LACExplodeTmp is filled through the method LACExplodeTmp_ByInventTable().

The following is the result of generating the report for Bill Of Materials (BOM):

423350@LAC365FO – Support is needed for Code to print ProForma, found in Post invoice proforma > Get PDF

In Lasernet FO Connector, reports are normally executed asynchronously, which means a process can be finished before receiving a document from Lasernet.

This approach ensures the best possible performance and high throughput when using multi-threading in Dynamics 365.

However, when running reports through code, it may be necessary to verify a report as part of a workflow.

The new option Run and get PDF (Sync) enables users to run a report through code in synchronous mode: this way, Lasernet FO Connector will wait to receive the report from Lasernet before proceeding to the next steps.

If you encounter the following error, generate the report using + Create report. This will re-build the report used for the Run and get PDF (Sync) in its entirety.

Error

Report 'LACTutorialQueryBasedReport' was not found. Click 'Create report' to create it.

Code:

[Control("Button")]

class RunSyncAndGetPDF

{

/// <summary>

///

/// </summary>

public void clicked()

{

boolean fileGenerated;

// Run report without contextual information - standalone (Form Links will be skipped)

LACReportName reportName = 'LACTutorialQueryBasedReport';

LACReport reportRec = LACReport::find(reportName);

if (!reportRec)

{

throw error(strFmt('Report \'%1\' was not found. Click \'Create report\' to create it.', reportName));

}

LACRunQueryServiceController runQueryReport = LACRunQueryServiceController::newReport(reportName, LACArgsCache::newCache(reportName), true); // <- True -> load from last values

// Optional - set query ranges

Query q = runQueryReport.parmLACRunQueryDataContract().parmQuery();

QueryBuildDataSource qbds = q.dataSourceTable(tableNum(InventTable));

qbds.addRange(fieldNum(InventTable, ItemId)).value('123');

// Where to print - Set settings for Sync and non delivery mode

//SRSPrintDestinationSettings pds;

//pds = new SRSPrintDestinationSettings();

//pds.printMediumType(SRSPrintMediumType::LACScreen); // Lasernet Fax is used as destination - as we need just to create PDF without actual distributing it

//pds.lacDestinationSettings().destTypes4Print(LACDestinationSettings::SRSPrintMediumType2LACDestTypes4Print(pds.printMediumType()));

//pds.lacDestinationSettings().forceReRun(NoYes::Yes); // This flag uses Force rerun of the report. Set NoYes::No if you want already existing Arhice to be picked up

//pds.lacDestinationSettings().skipDelivery(true); // This flag skips file distribution in Lasernet server

//pds.lacDestinationSettings().returnFileData(NoYes::Yes); // This flag makes process to run in Synchronous mode, and waits for results from Lasernet server

runQueryReport.parmPrintSettings().unpack(LACReportRunResult_DispContext::getSRSPrintDestinationSettings().pack());

// Optional - Show/Hide dialog

runQueryReport.parmShowDialog(false);

// Using Disposable context object that is wrapping actual Posting process, that has Report print inside

// This conext object can be accessed from the inner process and used to put required information. In this case Result of PDF file

using (LACReportRunResult_DispContext reportRunResultContext = new LACReportRunResult_DispContext())

{

runQueryReport.startOperation();;

// result to be filled in with all infomration (PDF binaries) in deeper process

while (reportRunResultContext.moveNextLACResult())

{

if (reportRunResultContext.currentLACResult().dataPDF())

{

str resultReportName = reportRunResultContext.currentLACResult().parmReportName();

Filename fileName = resultReportName + '_' + reportRunResultContext.currentLACResult().firstDestination().outputFile(LACFileType::PDF).fileNameOnly();

System.IO.MemoryStream fileData = Binary::constructFromContainer(reportRunResultContext.currentLACResult().dataPDF()).getMemoryStream();

File::SendFileToUser(fileData, fileName);

fileGenerated = true;

}

}

}

if (!fileGenerated)

{

warning('No files were generated or retrieved.');

}

}

}

423339@LAC365FO – Query wizard deletes Values in Elements

Values visible in the Structure/Elements can be modified and used through context code.

In previous versions of Lasernet FO Connector, already entered Values were deleted when using Reload report fields with the Reset modifications button toggled to No.

In version 6.21, already entered Values are saved when the Reset modifications button is toggled to No.

Previous versions

Lasernet FO Connector 6.21


423013@LAC365FO – Node clones are inserted as child nodes even when they are parent nodes instead

In previous versions, if a child data source had Layout as SameLevel as its parent, the parent's Structure might be duplicated in the output for that child data source.

This could happen, for example, with the BOMTable having SameLevel as a child data source.

This has now been fixed.

The left-hand side of the following image displays Lasernet FO Connector 6.20, where the initial segment of the parent’s Structure is duplicated.

The right-hand side of the image, instead, shows the correct output, where the Structure is not repeated.

422777@LAC365FO – When a field containing an image is added to the Query wizard, the Data type is set to Container by default

In previous versions, when a field containing an image was added to the Query wizard, the Type/Data type was set to Container by default.

This has been fixed in Lasernet FO Connector 6.21, where the Type/Data type is Base64 file, as this is the format that Lasernet can use.

Previous versions

Lasernet FO Connector 6.21

422767@LAC365FO – The OneClick function now enables adding fields/methods in the Query wizard

Lasernet FO Connector’s OneClick function is an easy way to add additional fields to a report.

In previous versions, OneClick could only add fields to the Structure/Elements of a report, whereas now it also enables users to add fields to a Query (Query wizard).

Adding fields to the Query wizard ensures better performance than doing so within a report's Structure/Elements.

Toggling the Automatic button to Yes will add the field to the Query. However, using Automatic is only possible if the table used for the specific field exists within the Query.

The following is an example of how the field Name from DirPartyTable can be added directly to the Query:

Users can modify the Value contained in the Expression, which is a quick way to include new data in a report.

The Values that are available for selection are consistent with the values that can be chosen in Lasernet FO Connector.

To add a field with OneClick, follow these steps:

1. Right-click a field and choose Personalize.

2. Select Add to report.

422413@LAC365FOLAC81WHSContainerContentsController_Extension duplicates functionality that cannot be switched off

In previous versions, the following Fix for standard Dynamics 365 FO could not be turned off.

This has now been fixed.

422746@LAC365FO – The Dutch (nl) translation for the Lasernet Printers overview is incorrect

The following two labels are now translated when the client language is set to Dutch (nl, nl-BE):

Previous versions

Lasernet FO Connector 6.21

422617@LAC365FO – It is not possible to import both "Test checkpoint" and "Document value" at the same time

Scenario: The All tables checkbox for the report was checked at the time of import. Now, this report needs to be exported from the backup, which only includes the report itself and a Test checkpoint.

In previous versions, the following error could occur:

Error

The menu item with name lacxmlimportreportsext could not be opened.

A similar issue would arise when importing a backup containing only a Test checkpoint and a Document value (Lasernet log).

Both issues have been fixed in Lasernet FO Connector 6.21.

421601@LAC365FO - Pre-saved report name finder data blocks Lasernet Connector destinations in dialog

In previous versions, the printer settings would, at times, be stored in a field within a table.

This would cause a problem if the report did not have Lasernet set as the destination, as the system would attempt to skip the existing stack saved within the field to achieve better performance.

In the following example, it is not possible to choose Lasernet as the destination:

No Lasernet destinations are available:

421600@LAC365FO - An export issue arises with the Range of type Array

In previous versions, using an Array field as part of the Query would cause two issues in the Ranges.

First issue - If an Array type Range was added and the Filter was set to No, the Array value would not be exported/imported correctly.

After exporting or importing the Query, the Array value disappeared.

Second issue - The following error would occur when trying to import a report containing Array fields:

Error

Import of reports.Deserializing LACReport.OriginData (ReportName="LACWHSInventTable") Array field WHSInventTable.FilterCode index out of range: QueryArrayFieldRangeMetadata.ArrayFieldIndex

These issues have been fixed in Lasernet FO Connector 6.21.

421346@LAC365FO - An issue arises when trying to import AOT Queries that use cross-company in AOT

In previous versions, exporting an AOT Query for which CrossCompany was enabled in AOT would cause the following error:

Query ProjTableCrossCompanyQuery in AOT:

Error

Export of reportsThe value "System.Object[]" is not of type "System.String" and cannot be used in this generic collection. Parameter name: value

420572@LAC365FO - An issue arises when using the LACOriginalDocumentTitle method within an Expression

In previous versions, an issue would arise when using methods such as LACOriginalDocumentTitle within an Expression, as the system would not always return the proper value.

This has now been fixed.

To avoid the issue, validate the report in case no output is generated or extension methods such as LACOriginalDocumentTitle are used within an Expression.

In previous versions, extension methods would work as expected when used directly within a table:

They would not work, instead, when used as part of an Expression:

When validating a report, the following warning would be displayed, which identifies the method used within the Expression:

To fix this in Lasernet FO Connector 6.21, recreate the Expression by reselecting the existing value within the Expression editor, either by using the drop-down for the segment or by removing the last ) and then re-adding it.

420557@LAC365FO - An Error message appears if a report contains a fixed Email subject/body

In previous versions, the following error could occur if a report contained a fixed Email subject/body, even though everything would work as expected:

Error

Error executing code: LACValueBase object does not have method 'Create'.

This has been fixed.

420552@LAC365FO - An issue arises when the same data type is used more than once

In previous versions, when using a value more than once, Lasernet FO Connector would not apply the correct data type: the system would keep the data type employed in the first entry, not taking into account the one used in the second entry.

This only happened if the same value was added more than once within the same section where Expressions and other values were cached (saved and taken from memory). The reason for this is that the data type was converted into the data type specified for the reuse of the value.

Scenario: A logo is added three times. The first time, the Container data type is used, while the second and third times, a Base64 file is used. The Base64 file data type will be discarded, and the Container data type will be used in all three entries.

The best solution to this problem is to include information in the Query wizard and avoid repeating information.

Previous versions:

The Base64 file data type was not used for the second and third entries.

Lasenret FO Connector 6.21:

The Base64 file data type is respected and used for the second and third entries.

418133@LAC365FO - Enhancement of the Expression editor functionality

In Lasernet FO Connector 6.21, the connection between the Expression editor and the Select value field (lookup) is enhanced: the lookup matches the segmented entry chosen in the Expression editor.

The following is an example where a parameter is chosen inside the Expression editor.

Previous version

Lasernet FO Connector 6.21

416910@LAC365FO - Region-specific format is triggered when printing to Lasernet, even when Standard Format is selected in Print management

In previous versions, the configuration and enabling of an alternative Report format were sometimes required even though the original Report format was kept unchanged.

In the following example, the Report and ReportFR Report formats are available, but only Report is used.

The Report format ReportFR had to be configured and enabled within the FO Connector, even though ReportFR was not used.

This is because, in standard Dynamics 365 FO, the reporting process always starts from the original report (such as SalesInvoice.Report) and only later uses the alternative report (SalesInvoice.ReportFR). Some parts of the process are configured, and others are managed via code.

Lasernet FO Connector 6.21 can use the original Report format (design) without the need to configure alternative Report formats.

Previous versions

Lasernet FO Connector 6.21

415459@LAC365FO - An issue arises regarding the number of copies set in Printer settings initialization

In previous versions, when using the Fixed (read only) or Start with options, the number of copies set in Printer settings initialization was not respected when running the report.

Number of copies expected: 4 - Fixed (read only).

Number of copies expected: 6 - Start with.

Number of copies printed to Lasernet: 1.

This has now been fixed.

415350@LAC365FO - Two new options have been added that users can choose from when reviewing reports

The Review functionality has been improved.

Reviewing reports/documents is extremely useful in case a report/document needs to be approved before it is delivered or the destination used for a report needs to be both verified and altered.

It is also useful to test that the proper destination is used within a TEST/UAT environment and in case reports/documents do not get delivered.

When reviewing reports, you can now choose between two new options:

  • Remove review

  • Decide later (previously Cancel)

The signature and other options remain unchanged. The same approach as in previous versions is used for selecting alternative destinations.

Remove Review

This option will remove the review entries both in the Lasernet Archive and within the attachments if Document handling has been configured for the report.

Decide Later (Previously Cancel)

This option will mark the Archive entry as Pending review. The entry will then need a Review before it is removed.

When using Document handling to attach the report, the system will show that the attachments are [In Review].

The report will not appear as an attachment until the report has been delivered.

The options Deliver report and Remove review are disabled until the report is available in storage (after Lasernet has processed the report).

The Decide later option also works with proforma reports and does not need the documents (PDF) to be saved in the Lasernet Archive.

If the reports are not archived or are proforma reports, a temporary entry is created in the Lasernet Archive.

Deliver report or Remove review delete this temporary entry.

415218@LAC365FO - Error: “You are unable to navigate directly to this menu item...”

In previous versions, the following error could occur when using task recordings with a user who did not have the role of System Administrator:

Error

You are unable to navigate directly to this menu item lactestuxloadrunredirect.

AllowRootNavigation has been enabled in Lasernet FO Connector 6.21 to avoid this error message.

Root navigation for lactestuxloadrunredirect:

409604@LAC365FO - An issue arises when trying to create a Range that includes the ValidTo and ValidFrom fields

In previous versions, it was not possible to select the ValidFrom and ValidTo fields in the Ranges within the Dialog setup.

In Lasernet FO Connector 6.21, users can add the ValidFrom and ValidTo fields as part of the Default ranges for the Query.

It is not possible to add the fields when running the report. However, this can become possible by adding the fields as Dialog fields and parsing the values to the Default ranges.

Lasernet FO Connector 6.21 supports adding the fields ValidFrom and ValidTo to the Default ranges of a Query.

408871@LAC365FO – A Test Unit has been added to the model LACTestSuite to prevent errors when using a build pipeline

A Test Unit has been added to the model LACTestSuite to prevent errors when using a build pipeline.

In previous versions, errors would occur when the standard build pipeline tried to run Test for every DLL containing Test as part of the name.

Error

Copyright (c) Microsoft Corporation. All rights reserved.

vstest.console.exe "C:\DynamicsSDK\VSOAgent\_work\1\Bin\LasernetTestSuite\Resources\LACTest.dll"

"C:\DynamicsSDK\VSOAgent\_work\1\Bin\LasernetTestSuite\Resources\da\LACTest.resources.dll"

"C:\DynamicsSDK\VSOAgent\_work\1\Bin\LasernetTestSuite\Resources\de\LACTest.resources.dll"

"C:\DynamicsSDK\VSOAgent\_work\1\Bin\LasernetTestSuite\Resources\en-GB\LACTest.resources.dll"

"C:\DynamicsSDK\VSOAgent\_work\1\Bin\LasernetTestSuite\Resources\en-US\LACTest.resources.dll"

"C:\DynamicsSDK\VSOAgent\_work\1\Bin\LasernetTestSuite\bin\Dynamics.AX.LasernetTestSuite.dll"

/Settings:"C:\DynamicsSDK\VSOAgent\_work\_temp\aew0d4fbjts.tmp.runsettings"

/EnableCodeCoverage

/Logger:"trx"

/TestAdapterPath:"C:\DynamicsSDK\VSOAgent\_work\1\Bin"

/Platform:X64 /InIsolation /UseVsixExtensions:true

/UseVsixExtensions is getting deprecated. Please use /TestAdapterPath instead.

##[error]Failed to find the list of installed unit test extensions. Reason: System.ArgumentNullException: Value cannot be null.

##[error]Parameter name: type

##[error] at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)

##[error] at System.Activator.CreateInstance(Type type, Object[] args)

##[error] at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.VSExtensionManager.GetTestExtensionsInternal(String extensionType)

##[error] at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.VSExtensionManager.GetUnitTestExtensions()

Vstest.console.exe exited with code 1.

**************** Completed test execution *********************

Test results files:

##[error]Error occurred while publishing test results : MS.VS.TestService.VstestConsoleAdapter.NoTrxFoundException: No trx files found in the specified test results directory C:\DynamicsSDK\VSOAgent\_work\_temp\TestResults.

##[error]Skipping marking test run as complete as test run id 0 is invalid.

Completed TestExecution Model...

##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.

##[error]Error: The process 'C:\DynamicsSDK\VSOAgent\_work\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.234.0\Modules\DTAExecutionHost.exe' failed with exit code 1

##[error]Vstest failed with error. Check logs for failures. There might be failed tests.

399154@LAC365FO - A horizontal slider has been added to the UI

A horizontal slider has been added to the UI of the Export Lasernet backup page between the lists Selected reports and Selected tables.

388866@LAC365FO - An option has been added to export Only active reports

The Active column has been added to the Selected reports list in the Export Lasernet backup page and can be used to filter active reports within the export.

Furthermore, a new option has been added to export Only active reports, which can be found next to the All reports checkbox.

385609@LAC365FO - Replicate test data now supports the creation of Intercompany sales orders

In Lasernet FO Connector 6.21, the Replicate test data feature within the Test and Performance Suite supports the creation of Intercompany (IC) sales orders.

This feature is useful for handling a high volume of sales orders and stress-testing the posting of packing slips or invoices.

Replicate test data is a fast and simple way to prepare a high volume of sales/purchase orders, as orders can be created within batch tasks and, therefore, take advantage of threading.

Similarly, this feature is useful for benchmarking performance with a high volume of sales orders within a multithreaded batch execution.

381089@LAC365FO - Replicate test data now supports the creation of attachments

Lasernet FO Connector 6.21 supports the creation of attachments in Replicate test data within the Test and Performance Suite.

This feature is useful for benchmarking the creation and posting of a high volume of orders that include attachments.

375778@LAC365FO - A new option is available to only include a report in the Report group if the report exists within the file used for the import

In previous versions, all reports associated with a Report group were added when making an import containing that Report group.

In the following example, ReportA and ReportB are associated with the same Report group:

In previous versions, an export of ReportA that included the Report group would also include ReportB.

Lasernet FO Connector 6.21 includes a new option to only include a report in the Report group if the report exists within the file used for the import.

Helpful Unhelpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?