AL icon indicating copy to clipboard operation
AL copied to clipboard

Word layouts keep randomly getting changed when compiling application.

Open nickgoddard777 opened this issue 3 years ago • 1 comments

Please include the following with each issue:

1. Describe the bug I am working on a project with 3 other developers and randomly 2 of the 4 Report Extensions we have, change the related Word Layout. The code of the report hasn't been changed so I wouldn't expect the word layout needing to be updated, but every few compiles some of the layouts appear in the source control section of VS Code, we have no idea what has changed and if it is a report that one of the others has created we don't know if it's correct.

2. To Reproduce Steps to reproduce the behavior: In VS Code press F5 to publish the project, 2 word layouts appear in the source control. This isn't everytime though and I'm not sure what the difference is

  1. Go to '...' Below is part of the report extension object. If you need any information then contact me separately and I can provide the Report.al files and the Word Layout
reportextension 50003 "ACO Sales Order Conf." extends "Standard Sales - Order Conf."
{
    WordLayout = './src/layouts/Rep-Ext50003.SalesOrderConf.docx';

    dataset
    {
        add(Header)
        {
            column(TelNoText; TelNoText)
            { }
            column(WebSiteText; WebSiteText)
            { }
            column(ShipmentTermsText; ShipmentTermsText)
            { }
            column(ContactInfo; ContactInfo)
            { }
            column(InvoiceText; InvoiceText)
            { }
            column(Footer1; Footer1)
            { }
            column(Footer2; Footer2)
            { }

        }
    }
}

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

3. Expected behavior I would expect a new Word Layout to be generated only when either the base report has been updated or the Report Extension object has changed.

4. Actual behavior As above when we compile the project randomly the Word Layouts appear in the Source Control as changed

5. Versions:

  • AL Language: v9.3.646020

  • Visual Studio Code: 1.69.2

  • Business Central: 20.3

  • List of Visual Studio Code extensions that you have installed:

  • AL CodeActions

  • AL Language

  • AL Navigator

  • AL Variable Helper

  • AZ AL Dev Tools/AL Code Outline

  • BusinessCentral.LinterCop

  • Git Graph

  • GitHub Pull Requests and Issues

  • GitLens

  • TODO Highlight

  • vscode-icons

  • waldo's CRS AL Language Extension

Final Checklist

Please remember to do the following:

  • [ ] Search the issue repository to ensure you are reporting a new issue

  • [ ] Reproduce the issue after disabling all extensions except the AL Language extension

  • [ ] Simplify your code around the issue to better isolate the problem

nickgoddard777 avatar Jul 26 '22 10:07 nickgoddard777

Yes, this is a known long standing issue with word layouts. We have an internal bug tracking this. I'll link this github issue on the internal work item, and we'll update this github issue when it is addressed.

thloke avatar Jul 27 '22 03:07 thloke

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 22.0.49452.0 and VS Code Extension Version 11.0.710673.

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/

JesperSchulz avatar Nov 18 '22 11:11 JesperSchulz