waldo1001 / crs-al-language-extension

Make working with the (Dynamics NAV / 365) AL Language easier and more efficient.
MIT License
34 stars 43 forks source link

"CRS: Rename - Current File" - reportextension - column #249

Closed g-franck closed 2 years ago

g-franck commented 2 years ago

Hi,

"CRS: Rename - Current File" not rename columns with prefix/suffix in reportextension, as it should be according to documentation below:

Benefits and Guidelines for using a Prefix or Suffix - General rules

Thanks.

waldo1001 commented 2 years ago

I'd like to repro your problem. Could you send me an example of a reportextension and what you'd expect it to behave?

g-franck commented 2 years ago

To reproduce, for example, Create a reportextension of standard report "Standard Sales - Order Conf." (1305), Add a column with a name who already exists in the standard report "CRS: Rename - Current File" correctly renames the object with my prefix (APO_) but not the name of the new column

reportextension 50000 "APO_StandardSalesOrderConf" extends "Standard Sales - Order Conf." //1305
{
    dataset
    {
        add(Header)
        {
            column(YourReference; YourReference)
            {

            }
        }
    }

    var
        YourReference: Text[35];
}

Error:

A member of type ReportColumn with name 'YourReference' is already defined in Report 'Standard Sales - Order Conf.' by the extension 'Base Application by Microsoft.

waldo1001 commented 2 years ago

Good point.

So, the result in above should be:

reportextension 50000 "APO_StandardSalesOrderConf" extends "Standard Sales - Order Conf." //1305
{
    dataset
    {
        add(Header)
        {
            column("APO_YourReference"; YourReference)
            {

            }
        }
    }

    var
        YourReference: Text[35];
}

Right?

g-franck commented 2 years ago

Yes, according to CRS.ObjectNamePrefix or CRS.ObjectNameSuffix.

waldo1001 commented 2 years ago

I think the same counts for RequestPages.. 🤔

waldo1001 commented 2 years ago

Fix is on its way in release 1.5.13! If it doesn't work, just open this issue again!