Giter VIP home page Giter VIP logo

bcapps's Introduction

Welcome to BCApps: Microsoft Dynamics 365 Business Central Application

The Repository

This repository contains the source code for several Business Central applications, developed by Microsoft.

The source code in this repository is available to everyone under the standard MIT license.

BCApps run on AL-Go for GitHub

Contributing

In this repository, we welcome contributions to the System Application, Business Foundation and the Developer Tools, such as Test Runner, Performance Toolkit and others.

  • If you are looking to contribute to Microsoft's 1st party apps you can do so in the ALAppExtensions repository.
  • If you are looking to contribute to the Base Application you can do so in the BusinessCentralApps repository. Please note, that this repository is private but you can request access by filling out this form.

Want to learn more about how to contribute to this repository? Please refer to our Contribution Guidelines.

⚠IMPORTANT⚠: This is not the right place to report product defects with customer impact to Microsoft! Issues created in this repository might not get picked up by the Microsoft engineering team and issues reported in this repository do not fall under SLAs (Service Level Agreements) and hence have no guaranteed time to mitigation, just as provided fixes won't get backported to all supported versions of the product.

Repository Structure

  • src folder stores the source code for Business Central application, such as System Application and developer tools like test libraries, test runner and others.
  • src\rulesets is where the rulesets for building the applications are stored.
  • build folder contain the magic around how the applications are build.
  • build\projects is where all AL-Go projects are defined.

Business Central

image

Business Central is a business management solution for small and mid-sized organizations that automates and streamlines business processes and helps you manage your business. Highly adaptable and rich with features, Business Central enables companies to manage their business, including finance, manufacturing, sales, shipping, project management, services, and more. Companies can easily add functionality that is relevant to the region of operation, and that is customized to support even highly specialized industries. Business Central is fast to implement, easy to configure, and simplicity guides innovations in product design, development, implementation, and usability.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

bcapps's People

Contributors

aholstrup1 avatar andreasmoth avatar bazookamusic avatar bcbuild-github-agent avatar blrobl avatar chrisblankde avatar darjoo avatar denlillemand avatar drakonian avatar encimita avatar gggdttt avatar grobyns avatar haoranpb avatar henrikfrovst avatar ihorhandziuk avatar jesperschulz avatar juliamakulec avatar mazhelez avatar microsoftopensource avatar msft-sam avatar navfreak avatar nhsejth avatar onbuyuka avatar pri-kise avatar qasimikram avatar qutreson avatar sbalslev avatar stkillen avatar waelabuseada avatar waldo1001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bcapps's Issues

[Bug]: Reading additional metadata from SharePoint using GetFolderFilesByServerRelativeUrl

Describe the issue

I am trying to use the SharePoint module to read additional metadata on the items.
I see there is the following IntegrationEvent which refers to exactly what I want to do.

    [IntegrationEvent(false, false)]
    /// <summary>
    /// Process SharePointFile Metadata - Use to extract custom meta data into model record
    /// </summary>
    /// <remarks>Extend the "SharePoint File" table to store any custom data.</remarks>
    /// <param name="Metadata">__metadata node of SharePointFile Json Object</param>
    /// <param name="SharePointFile">SharePointFile temporary record.</param>
    internal procedure ProcessSharePointFileMetadata(Metadata: JsonToken; var SharePointFile: Record "SharePoint File" temporary)
    begin
    end;

It refers to extending the "SharePoint File" table but the table is not extendable. I could work round that but still think it needs fixing.

The bigger issues is the JsonToken that is passed is just the file Id and no metadata.
The below is take from codeunit 9106 "SharePoint File"

        if Payload.Get('ListItemAllFields', JToken) then begin
            Payload := JToken.AsObject();

            if Payload.Get('Id', JToken) then
                SharePointFile.Id := JToken.AsValue().AsInteger();

            SharePointClient.ProcessSharePointFileMetadata(JToken, SharePointFile);
        end;

Should the the Payload JsonObject not be the thing that is passed?

Expected behavior

  1. Ability to extend the "SharePoint File" table
  2. To be passed all metadata to the integration event

Steps to reproduce

image

  1. I would expect the below to show Json of the metadata
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"SharePoint Client", 'ProcessSharePointFileMetadata', '', false, false)]
    local procedure ProcessSharePointFileMetadata(Metadata: JsonToken; var SharePointFile: Record "SharePoint File" temporary)
    begin
        Message(format(Metadata));
    end;

Additional context

n/a

[Bug]: BCPT - RunId is always "00.." in Telemetry.

Describe the issue

When Running BCPT from DevOps, the RunId always is {00000000-0000-0000-0000-000000000000}

image

While in Telemetry, this is a very important field for reporting (distinguish one "run" from another)

Expected behavior

RunId <> {00000000-0000-0000-0000-000000000000}

Steps to reproduce

Run BCPT from DevOps & track in Telemetry

Additional context

None

[Bug]: "FindBlobsByTags" feature escapes parameters two times

Describe the issue

When the "FindBlobsByTags" function is invoked, the expression is encoded during the creation using the "TagsDictionaryToSearchExpression" function. Later in the functionality,

"PrepareRequestMsg -> ConstructUri -> AddOptionalUriParameters -> AppendToUri"

the URL along with the parameter string (expression) will be encoded again, leading to incorrect encoding of the parameters.

Expected behavior

The encoding in the "TagsDictionaryToSearchExpression" is not needed.

Steps to reproduce

Adding a filter in the SearchTags dictionary.

Additional context

Can i make a PR to remove this line?

image
Removing the "Expression := UriHelper.EscapeDataString(Expression);" code line would solve the issue because the URL will always be encoded in the last part.

Kind regards
Lorenz

[Bug]: Better repo documentation

Describe the issue

Not a bug, but doing bc-idea for repo information would be overkill. Plus @JesperSchulz told to make an issue of it 😉

First time I came to the repo I expected more information about the repo and the system app so I was a little bit surprised when I couldn't find it. But last week I stumbled across the exactly this information on learn when studying for the developer certification.
So I seized the opportunity to add it there.

Expected behavior

I want a chapter "Get to know System App" with links to information in CONTRIBUTING.md

The chapter should contain these links
image

Steps to reproduce

n/a

Additional context

Already got a branch ready to turn into a PR.
image

I will provide a fix for a bug

  • I will provide a fix for a bug

@Krajzys @JesperSchulz Hi, I'm messing about with this in the most recent release and it works great with SAS Token but when I try to use a Shared Key for authentication I run into issues uploading a file to the File Share. I have attached the error. Any ideas? Authentication using shared key works fine for downloading and listing directory requests.

          @Krajzys  @JesperSchulz  Hi, I'm messing about with this in the most recent release and it works great with SAS Token but when I try to use a Shared Key for authentication I run into issues uploading a file to the File Share. I have attached the error. Any ideas? Authentication using shared key works fine for downloading and listing directory requests.

image

Originally posted by @PJohnstonSysco in #341 (comment)

[Extensibility Bug]: Provide a possibility to set the Telemetry Logger Interface explicit instead of relying on a event subscriber on publisher

Describe the issue

I'd like to have the possibility to explicit the the "Telemetry Logger" Interface, when using the Telemetry or FeatureTelemetry Codeunits.

Currently we need a subscriber in any of our apps (with identical publisher).
And since we don't know which app is installed we might subscribe multiple times to this event publisher, which results in an additional telemetry event, that I want to avoid.

Expected behavior

it should be possible to explicit set the interface via a Setter Method on the Public Facade Codeunits.

or in other words:

it should be possible to set an TelemetryLogger Interface to skip the following lines

        TelemetryLoggers.SetCurrentPublisher(Publisher);
        TelemetryLoggers.OnRegisterTelemetryLogger();

        if TelemetryLoggers.GetTelemetryLogger(TelemetryLogger) then

https://github.com/microsoft/BCApps/blob/636c354bc6d2b27ba6527fd193ac494af7f8ebfa/src/System%20Application/App/Telemetry/src/Logging/TelemetryImpl.Codeunit.al#L41C1-L41C1

Steps to reproduce

Create two apps with the same publisher and subscribe to the the TelemetryLogger Event.

Additional context

I already talked to some people of microsoft at Directions EMEA 2023 and they suggested to open an issue for this topic to discuss here fruther with @IhorHandziuk who created this module.

Action required: self-attest your goal for this repository

It's time to review and renew the intent of this repository

An owner or administrator of this repository has previously indicated that this repository can not be migrated to GitHub inside Microsoft because it is going public, open source, or it is used to collaborate with external parties (customers, partners, suppliers, etc.).

Action

👀 ✍️ In order to keep Microsoft secure, we require repository owners and administrators to review this repository and regularly renew the intent to either opt-in or opt-out of migration to GitHub inside Microsoft which is specifically intended for private or internal projects.

❗Only users with admin permission in the repository are allowed to respond. Failure to provide a response will result to your repository getting automatically archived. 🔒

Instructions

❌ Opt-out of migration

If this repository can not be migrated to GitHub inside Microsoft, you can opt-out of migration by replying with a comment on this issue containing one of the following optout command options below.

@gimsvc optout --reason <staging|collaboration|delete|other>

Example: @gimsvc optout --reason staging

Options:

  • staging : My project will ship as Open Source
  • collaboration : Used for external or 3rd party collaboration with customers, partners, suppliers, etc.
  • delete : This repository will be deleted because it is no longer needed.
  • other : Other reasons not specified

✅ Opt-in to migrate

If the circumstances of this repository has changed and you decide that you need to migrate, then you can specify the optin command below. For example, the repository is no longer going public, open source or require external collaboration.

@gimsvc optin --date <target_migration_date in mm-dd-yyyy format>

Example: @gimsvc optin --date 03-15-2023

Click here for more information about optin and optout command options and examples

Opt-in

@gimsvc optin --date <target_migration_date>

When opting-in to migrate your repository, the --date option is required followed by your specified migration date using the format: mm-dd-yyyy

@gimsvc optin --date 03-15-2023

Opt-out

@gimsvc optout --reason <staging|collaboration|delete|other>

When opting-out of migration, you need to specify the --reason.

  • staging
    • My project will ship as Open Source
  • collaboration
    • Used for external or 3rd party collaboration with customers, partners, suppliers, etc.
  • delete
    • This repository will be deleted because it is no longer needed.
  • other
    • Other reasons not specified

Examples:

@gimsvc optout --reason staging

@gimsvc optout --reason collaboration

@gimsvc optout --reason delete

@gimsvc optout --reason other

Need more help? 🖐️

[BC Idea]: Support of RSACryptoServiceProvider.ImportEncryptedPkcs8PrivateKey Method

BC Idea Link

https://experience.dynamics.com/ideas/idea/?ideaid=a9ddabfd-ca32-ee11-a81c-6045bdb6c2ac

Description

We need to be able to work with an encrypted private key in "DER-encoded encrypted PKCS8" format.

Specifically, to import and decrypt the key using the provided password, convert and save it to XmlString format.

Furthermore, use the key to sign the data using RSACryptoServiceProvider, SHA512 hash function, PKCS#1 v1.5 padding

In the BC22 System Application, there are appropriate codeunits 1474 "Signature Key" and 1266 "Cryptography Management", but they do not provide these functions.

The idea is to add new procedures to these codeunits to enable the desired functionality.



Internal work item: AB#479951

[BC Idea]: New Compare Methods for Time and DateTime Comparison

BC Idea Link

https://experience.dynamics.com/ideas/idea/?ideaid=59c5f0fb-0683-ee11-a81c-000d3adc4046

Description

🕮 Describe the issue
The comparison of time values does not work if you compare the time value before writing to the database with the time value that was written to the database.
The cause of the problem is that in BC DateTime and Time values are rounded by SQL Server (See MS Docs). This means that a DateTime / Time value can change just because it was written to the database, the comparison with the original value then runs on error.

For DateTimes there is a method "CompareDateTime" in the codeunit TypeHelper to compare DateTimes with a small threshold value to compensate for the rounding of the DateTime values. However, the threshold seems to be unnecessarily large.
Also, there is no method to compare Times.

🔧 To Reproduce

Run the follwowing code:

codeunit 50100 "Insert Time"
{
    trigger OnRun()
    var
        Contact: Record Contact;
        NewLastModifiedTime: Time;
        TimeText: Text;
    begin
        TimeText := '12:40:22.468Z';
        Contact.Get('KT100006');
        Evaluate(NewLastModifiedTime, TimeText, 9);
        Contact."Last Time Modified" := NewLastModifiedTime;
        Contact.Modify();

       Message('Before Write to Database %1 = %2', Format(Contact."Last Time Modified", 0, 9), Format(NewLastModifiedTime, 0, 9));

        Commit();
        Contact.Get('KT100006');
        Message('After Write to Database %1 <> %2', Format(Contact."Last Time Modified", 0, 9), Format(NewLastModifiedTime, 0, 9));
    end;
}

The code will output the following Messages:

Before Write to Database 12:40:22.468Z = 12:40:22.468Z

After Write to Database 12:40:22.467Z <> 12:40:22.468Z

📣 Expected behavior
There should be methods to compare DateTime / Time values that take care of the sql rounding.

Additional context
Previous Disscussion to this topic: https://github.com/microsoft/BusinessCentralApps/issues/483
Yammer Thread: https://www.yammer.com/dynamicsnavdev/#/threads/show?threadId=2506817338753024

Testpage with DelayedInsert does not create records sometimes

Please include the following with each issue:

1. Describe the bug
In a testpage that has the DelayedInsert Property set the record is not created everytime. There's no error shown, it simple does not create the record which made it really hard to figure out the problem. Please have a look in the reproduction step as it's not easy to explain (as it's not that obvious)

2. To Reproduce
Steps to reproduce the behavior:

  1. Execute the following Test method.
  • It's fine to just specify the document no.
  • It's fine to specify the document no. and change the Account Type to a different value then the default one.
  • It's fine to specify the document no. and change the Account Type back and forth
  • It's NOT fine to re-enter the current Account Type. Then the record is simply not inserted anymore even there's no error shown.
codeunit 50100 "My Codeunit"
{
    Subtype = Test;

    [Test]
    procedure TestLine()
    var
        GenJournalLine: Record "Gen. Journal Line";
        LibraryAssert: Codeunit "Library Assert";
        PaymentJournal: TestPage "Payment Journal";
    begin
        PaymentJournal.OpenEdit();

        // Just validating the document no. is fine.
        // Record is inserted when leaving the line with .New();
        // Notice that Account Type::Vendor is the default value.
        PaymentJournal."Document No.".SetValue('1234');
        PaymentJournal.New();

        GenJournalLine.SetRange("Document No.", '1234');
        LibraryAssert.IsTrue(GenJournalLine.FindFirst(), 'Gen. Journal Line record not found');
        LibraryAssert.AreEqual(GenJournalLine."Account Type"::Vendor, GenJournalLine."Account Type", 'Account Type not equal');

        // Changing the Account Type to a different value (=Customer) then default (=Vendor) is also fine. 
        // Record is inserted when leaving the line with .New();
        PaymentJournal."Document No.".SetValue('2345');
        PaymentJournal."Account Type".SetValue(GenJournalLine."Account Type"::Customer);
        PaymentJournal.New();

        GenJournalLine.SetRange("Document No.", '2345');
        LibraryAssert.IsTrue(GenJournalLine.FindFirst(), 'Gen. Journal Line record not found when setting value to Customer');

        // Changing the Account Type to Vendor again after once changing it to a different value (=Customer) is also fine.
        // Record is inserted when leaving the line with .New();
        PaymentJournal."Document No.".SetValue('3456');
        PaymentJournal."Account Type".SetValue(GenJournalLine."Account Type"::Customer);
        PaymentJournal."Account Type".SetValue(GenJournalLine."Account Type"::Vendor);
        PaymentJournal.New();

        GenJournalLine.SetRange("Document No.", '3456');
        LibraryAssert.IsTrue(GenJournalLine.FindFirst(), 'Gen. Journal Line record not found when setting value to Customer, then Vendor');
        LibraryAssert.AreEqual(GenJournalLine."Account Type"::Vendor, GenJournalLine."Account Type", 'Account Type not equal');

        // !! Setting the Account Type to Vendor if it was already = Vendor is not fine.
        // Record is NOT inserted anymore after leaving the line with .New()
        PaymentJournal."Document No.".SetValue('4567');
        PaymentJournal."Account Type".SetValue(GenJournalLine."Account Type"::Vendor);
        PaymentJournal.New();

        GenJournalLine.SetRange("Document No.", '4567');
        LibraryAssert.IsTrue(GenJournalLine.FindFirst(), 'Gen. Journal Line record not found when setting value to Vendor only');
    end;
}

3. Expected behavior
The record has to be inserted still. And in case it's not, there has to be shown an error.

4. Actual behavior
Nothing happens. The General Journal Line is simply not created. If there wouldn't be the Library.IsTrue(GenJournalLine.FindFirst(), ..) statement, then the test method would simply succeed.

5. Versions:

  • AL Language: v12.5.914975
  • Visual Studio Code:
    Version: 1.85.1 (user setup)
    Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
    Date: 2023-12-13T09:49:37.021Z
    Electron: 25.9.7
    ElectronBuildId: 25551756
    Chromium: 114.0.5735.289
    Node.js: 18.15.0
    V8: 11.4.183.29-electron.0
    OS: Windows_NT x64 10.0.22631
  • Business Central: DE Business Central 23.2 (Platform 23.0.14532.0 + Application 23.2.14098.14562)
  • List of Visual Studio Code extensions that you have installed:

[Bug]: codeunit 149006 "BCPT Test Suite" - testing if suite exists

Describe the issue

I think this is an obvious one in https://github.com/microsoft/BCApps/blob/main/src/Tools/Performance%20Toolkit/App/src/BCPTTestSuite.Codeunit.al#L126C2-L126C2

        if BCPTHeader.Get(SuiteCode) then
            Error(TestSuiteAlreadyExistsErr, BCPTHeader.FieldCaption(Code), SuiteCode);

should be

        if not BCPTHeader.Get(SuiteCode) then
            Error(TestSuiteAlreadyExistsErr, BCPTHeader.FieldCaption(Code), SuiteCode);

on multiple places

Expected behavior

This makes lots of procs in this codeunit useless

Steps to reproduce

Use one of the proces that have this code

Additional context

I can change it for you ..

[Bug]: Unable to retrieve default country or preferred language from Azure AD Tenant

Describe the issue

Unable to retrieve default country or preferred language from Azure AD Tenant

Expected behavior

Expected to retrieve default country or preferred language from Azure AD Tenant

Steps to reproduce

procedure GetDefaultLanguage()
var entraTenant : codeunit "Azure AD Tenant"
begin
   message(entraTenant.GetCountryLetterCode);
end;

Additional context

Method does not exist

[Bug]: Missing function BCPT TestSuiteLineExists

Describe the issue

Currently there are no way of knowing if a TestSuiteLine that runs an object already exists.

Since removing the option Access = Internal is out of the option (#361 ) we have to create a function that returns true if a line with that objects exists.

An override function can also search for the combination of object and the parameter field.

To make the searching better a key should be created
key(Key3; "BCPT Code", "Codeunit ID", Parameters)

Expected behavior

Possible to see if a BCPT Suite line already exists.

Steps to reproduce

n/a

Additional context

I can fix it.

[Bug]: BCPT Function AddLineToTestSuiteHeader don't validate in standard parameters

Describe the issue

In following procedure

  procedure AddLineToTestSuiteHeader(SuiteCode: Code[10]; CodeunitId: Integer): Integer
    var
        BCPTHeader: Record "BCPT Header";
        BCPTLine: Record "BCPT Line";
        LastBCPTLine: Record "BCPT Line";

    begin
        if not BCPTHeader.Get(SuiteCode) then
            Error(TestSuiteNotFoundErr, BCPTHeader.FieldCaption(Code), SuiteCode);

        LastBCPTLine.SetRange("BCPT Code", SuiteCode);
        if LastBCPTLine.FindLast() then;
        Clear(BCPTLine);
        BCPTLine."BCPT Code" := SuiteCode;
        BCPTLine."Line No." := LastBCPTLine."Line No." + 1000;
        BCPTLine."Codeunit ID" := CodeunitId;
        BCPTLine.Insert(true);

        exit(BCPTLine."Line No.");
    end;

It doesn't get the standard parameters. It should validate in CodeunitId in order to get the standard parameters.
image

Expected behavior

When you call function AddLineToTestSuiteHeader(SuiteCode: Code[10]; CodeunitId: Integer): Integer it should validate in the CodeunitID so it gets the standard parameters that have been implemented via interfaces

Steps to reproduce

Create a BCPT Test Suite
Call the function: AddLineToTestSuiteHeader(SuiteCode: Code[10]; CodeunitId: Integer)
Codeunit ID should be a BCPT codeunit that has implemented standard parameters.
The new BCPT line has been created but with blank parameters.

Additional context

I can fix it

[Access Request] Sent Emails - NewerThanDate

Describe the request

Hello everyone,
we use this BC function for opening sent e-mails from interaction log entries:

Email.OpenSentEmails(Database::"Interaction Log Entry", Rec.SystemId);

However, the sent emails are only displayed if they are less than one month old, because it is programmed in the OnOpenPage-trigger of the page "Sent Emails":

trigger OnOpenPage()
    begin
        NewerThanDate := CreateDateTime(CalcDate('<-30D>', Today()), Time());
        ...
    end;

We do not have access to the variable NewerThanDate, nor can we manipulate the variable using a parameter or a function.

Our ideas:

  • Add a parameter for the datetime to the function Email.OpenSentEmails
  • ... and/or set the flexible datetime yourself based on the creation date of the record provided to the function, so that the page is filtered to at least this datetime.
  • ... and/or add an OpenSentEmails-procedure to the page "Sent Emails" and grant us access to the variable "NewerThanDate": changed to protected or via a set-function.

If more information is required, please let us know.
Thank you very much in advance!

Additional context

Emails are not intialy displayed if older than one month. We would like to get it more flexible.

[Bug]: Strange behavior on TestPages

Describe the issue

I have usind the newest VSCode Al Extention and Azure VM Deployment (Created on 12.01.2024)
I can open a Pages manualy without any problems, manualy Test going trow.

I have proper DEV lizenze and permisions.

If I create a TestPage on TestPage codeunit it do one of two things.

first i get a error

Error Message: Unerwartete CLR-Ausnahme.: Microsoft.Dynamics.Framework.UI.FormAbortException: Page Einstellungen has to close.
---> Microsoft.Dynamics.Nav.Types.NavPermissionException: Die aktuellen Berechtigungen haben die Aktion leider verhindert. (TableData 70080XXX [TableName] [Table Caption] Read: [permision])
....

Function that it couse:
[Test]
procedure TestSetupPage()
var
Setup: TestPage [PageName];
begin
Setup.OpenView();
Setup.Edit().Invoke();
...
end;

or

Error Message: Das Feld mit der ID '2098910360' wurde auf der Seite nicht gefunden. - Error Call Stack:

[Codeunit Name](CodeUnit [ID]).Function line 10 - [Application Test Name] by [Company Name]
"Test Runner - Mgt"(CodeUnit 130454).RunTests line 21
....

Function that couse (BOLD):

[Test]
//[HandlerFunctions('CreatePlatform')]
procedure CheckPlatformPage()
var
List: TestPage [TestPage];
begin
List.OpenView();

// Check Platform Visibility        
LibraryAssert.IsTrue(List.Code.Visible(), 'Code Visible');
LibraryAssert.IsTrue(List.Description.Visible(), 'Description Visible');
LibraryAssert.IsTrue(List."Type".Visible(), 'Type Visible');
**LibraryAssert.IsTrue(List."Region".Visible(), 'Region Visible');**

end;

Expected behavior

I expect that TestPage can do the same as Manual Test. (Similar)

Steps to reproduce

I do not know what produce thease Problems.

Additional context

If any screensshots or code needet just write me i send it personaly.

[Bug]: Action Populate From Extension in the Migration Table Mapping Page does not include Table Extensions from the Extension

Describe the issue

Context: 1) Migrating a BC14 Company to the Cloud and 2) Including Customizations, that is, extra fields in standard tables and custom tables.

For custom data to be migrated to the cloud, you have to 1) make a corresponding App including, at least, the tables and table extensions and 2) specify a Migration Table Mapping.

To help creating the mapping, the user can run the action Populate From Extension in the Migration Table Mapping page.

However, and this is the issue, the Populate From Extension only includes the new tables and ignore the table extensions in the custom app.

Expected behavior

I expected the Action Populate From Extension in the Migration Table Mapping Page to include Table Extensions from the Extension.

Steps to reproduce

  1. In a standard BC14 OnPrem make a small customization, adding a field to the G/L Entry table and a new table called M/S Cust. Data. It is important with the special characters / and point. This will illustrate how difficult this part is. The special characters have to be converted to the underscore character.
  2. Populate the fields and tables with data.
  3. Create a cloud environment BC23
  4. Perform a migration to the cloud

In the last step make sure that the custom data are migrated and pay attention the custom data are migrated.

Additional context

Suggested Fix

Object in question:

\ALAppExtensions\Apps\W1\HybridBaseDeployment\app\src\pages\MigrationTableMapping.Page.al

Suggested Fix

I suggest the following change. I have replaced the SetRange with this SetFilter.

ApplicationObjectMetadata.SetFilter("Object Type", '%1|%2', ApplicationObjectMetadata."Object Type"::Table, ApplicationObjectMetadata."Object Type"::TableExtension);
            action(PopulateFromExtension)
            {
                ApplicationArea = All;
                Caption = 'Populate From Extension';
                ToolTip = 'Populate the list with all tables from an existing extension.';
                Image = ItemSubstitution;
                Promoted = true;
                PromotedOnly = true;
                PromotedCategory = Process;

                trigger OnAction()
                var
                    ExtensionTableMapping: Record "Migration Table Mapping";
                    PublishedApplication: Record "Published Application";
                    ApplicationObjectMetadata: Record "Application Object Metadata";
                    TableMetadata: Record "Table Metadata";
                begin
                    if not Rec.LookupApp(PublishedApplication) then
                        exit;

                    ApplicationObjectMetadata.SetRange("Package ID", PublishedApplication."Package ID");
                    ApplicationObjectMetadata.SetFilter("Object Type", '%1|%2', ApplicationObjectMetadata."Object Type"::Table, ApplicationObjectMetadata."Object Type"::TableExtension);
                    if ApplicationObjectMetadata.FindSet() then
                        repeat
                            if not ExtensionTableMapping.Get(PublishedApplication.ID, ApplicationObjectMetadata."Object ID") then
                                if TableMetadata.Get(ApplicationObjectMetadata."Object ID") then
                                    if TableMetadata.ReplicateData then begin
                                        ExtensionTableMapping.Init();
                                        ExtensionTableMapping.Validate("App ID", PublishedApplication.ID);
                                        ExtensionTableMapping.Validate("Table ID", ApplicationObjectMetadata."Object ID");
                                        ExtensionTableMapping.Insert(true);
                                    end;
                        until ApplicationObjectMetadata.Next() = 0
                    else
                        Message(NoTablesInExtensionMsg);
                end;
            }

Disclaimer

I have, for obvious reasons, not been able to test this fix.

I will provide a fix for a bug

  • I will provide a fix for a bug

[Request] Add GetBlobMetadata procedure to ABS Blob Client codeunit

Hello,

In codeunit 9053 ABS Blob Client there is a procedure with several overloads GetBlobTags that allows us to get the tags associated with a particular blob in the Azure Blob Storage container. The tags can be retrieved as either an XmlDocument or Dictionary[Text, Text].

Is it possible to add similar procedures GetBlobMetadata to allow us to also get the metadata associated with a particular blob using ABS Blob Client?

Thanks in advance for your time.

[BC Idea]: Azure File Share API Module

BC Idea Link

None

Description

It would be helpful to add a module to handle Azure File Share service, that's available on the Azure Cloud, in the same way the Azure Blob Storage service is handled currently in the system.

The module was already written in the old repository (microsoft/ALAppExtensions#23710) and this issue is only to port the pull request to the new repository.

[BC Idea]: Make the 'Extension Marketplace' discoverable with 'AppSource'

BC Idea Link

https://experience.dynamics.com/ideas/idea/?ideaid=aae47d49-c78a-ee11-a81c-000d3a7aa8ae

Description

I often find myself searching for 'AppSource' via 'Tell me' to install apps from AppSource, but don't get the expected 'Extension Marketplace' page in the search results.

image

It would be nice if the 'Extension Marketplace' page was discoverable using the same keywords (at least 'appsource'), similar to the 'Extension Management' page.

image

Proposed change:

Add AdditionalSearchTerms = 'app,add-in,customize,plug-in,appsource'; to the 'Extension Marketplace' page


AppSource seems to be a valid search term as well in the BC community, compared to just 'marketplace', so page should be discoverable via both terms...

[Bug]: Cannot create GS-128 barcode

Describe the issue

Hi, according to the infromation: https://github.com/microsoft/BCApps/tree/main/src/System%20Application/App/Barcode#code128-value-110
Code-128 supports generating GS-128 barcode.

Also, we have info from the IDAutiomation that MS bought the appropriate font to generate GS-128 barcodes:
"Unfortunately, IDAutomation experience with Azure cloud and Business Central is limited to the information provided here: Barcode Integration Guide for Microsoft Dynamics 365 | Navision | Business Central (idautomation.com). To our knowledge, Microsoft has licensed our fonts/encoders for GS1-128 barcodes, but how to use the encoding tools provided by Microsoft will be up to them to provide you with instructions. I would recommend that you reach out to Microsoft to inquire as to how to use the IDAutomation tools that come with the cloud products for GS-128."

We tried to generate it, but without any success.

Expected behavior

Possibility to genere GS-128 barcode like this one:
image

How we can do this?

Steps to reproduce

Here is the example code we tried:
image
image
Result:
image

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug

[BC Idea]: Introduce option to suppress zero quantities in sales reports

BC Idea Link

https://experience.dynamics.com/ideas/idea/?ideaid=a5457f35-2577-ee11-a81c-000d3ae53364

Description

Concept:

  • A checkbox would be introduced in sales setup named "Do not print lines with 0 quantity".
  • A sales report would take this checkbox into account during printout in order to optionally suppress lines that have 0 quantity
  • Lines with Type=Comment would not react to this option and should be printed unless "Attached to Line No." has a value.
  • When "Attached to Line No." is present for the line with Type=Comment decision whether line should be printed out is inherited from the line to which the comment is attached to.

Background:

  • Trough partial invoicing and partial shipping the sales invoices may be created that contain some lines that have quantity 0 and come customers (but not all) want to suppress the printout of those lines.

[Bug]: User Settings Region Lookup does not preselect current setting (like Language Lookup does)

Describe the issue

In User Settings, the Region Lookup does not preselect the current setting in the list like the Language Lookup does. See LanguageImpl.LookupWindowsLanguageId().

Expected behavior

When selecting a region (Windows Language ID with Language.LookupWindowsLanguageId()), the passed language id should be preselected.

Steps to reproduce

  • Open User Settings
  • Click on Lookup Region

Afrikaans is selected, even if another region is current.

Additional context

[BC Idea]: Number Series Copilot

BC Idea Link

https://experience.dynamics.com/ideas/idea/?ideaid=ae4b0c3a-30d6-ee11-92bd-000d3adb9365

Description

Introducing the concept of a "Number Series Copilot" for Business Central, an innovative feature designed to simplify the creation of number series through natural language commands. This idea allows users to effortlessly set up number series for specific entities like customers, vendors, or even across all entities, by simply describing their needs or specifying a format example.

Idea Highlights:

  • Natural Language Processing: Users can interact with Business Central in everyday language to request the creation of number series, making the system more intuitive and user-friendly.

  • Customizable Formats: By providing examples or masks, users can define how their number series should be structured, offering flexibility and control over their data organization.

  • Efficiency and Time-Saving: Eliminates the complexity and manual effort involved in setting up number series, streamlining administrative tasks.

  • Accessibility: Makes the process of creating number series accessible to users with varying levels of technical expertise, democratizing the use of Business Central features.

This concept envisions a more interactive and intelligent Business Central, where routine tasks are automated and simplified through AI, enhancing the user experience and operational efficiency.

Linked ideas - Document numeration series templates

Number of Votes - 47

I will provide the implementation for this BC Idea

  • I will provide the implementation for this BC Idea

Fixes AB#503148

Internal work item: AB#503148

[Bug]: RSACryptoServiceProvider missing function to initialize an instance of the provider

Describe the issue

The RSACryptoServiceProvider codeunit has a ToXmlString function, to export the key, with or without the private key.
But this codeunit is missing a function to initialize an instance of the key provider, so ToXmlString with throw an error.

Expected behavior

I want to be able to initiate a new instance of the RSACryptoServiceProvider, so I can export it with ToXmlString to use it.
So I want to add this function:

/// <summary>
/// Initializes a new instance of RSACryptoServiceProvider with the specified key size and returns the key as an XML string. 
/// </summary>
/// <param name="KeySize">The size of the key in bits.</param>
procedure InitializeRSA(KeySize: Integer)
begin
    RSACryptoServiceProviderImpl.InitializeRSA(KeySize);
end;

And in "RSACryptoServiceProvider Impl.":

procedure InitializeRSA(KeySize: Integer)
begin
    DotNetRSACryptoServiceProvider := DotNetRSACryptoServiceProvider.RSACryptoServiceProvider(KeySize);
end;

Steps to reproduce

Call RSACryptoServiceProvider.ToXmlString, it will throw an error that RSACryptoServiceProvider is not instantiated.

Additional context

I am ready to supply a PR

[BC Idea]: BCPT Handled event in AddLogEntry

BC Idea Link

https://experience.dynamics.com/ideas/idea/?ideaid=15563e0c-b492-ee11-a81c-000d3a7e6e50

Description

In codeunit 149005 "BCPT Line" , there is the function:

 internal procedure AddLogEntry(var BCPTLine: Record "BCPT Line"; Operation: Text; ExecutionSuccess: Boolean; Message: Text; NumSQLStatements: Integer; StartTime: DateTime; EndTime: Datetime)

I would like that we put a handled integration event in the beginning of this function.

OnBeforeAddLogEntry(BCPTLine, Operation, ExecutionSuccess, Message, handled);

    if Handled then
      exit;
...
// Event code (wrong copy/paste in bc idea)

 [IntegrationEvent(false, false)]
    local procedure OnBeforeAddLogEntry(var BCPTLine: Record "BCPT Line"; var Operation: Text; var ExecutionSuccess: Boolean; var Message: Text; var Handled: Boolean)
    begin
    end;

Reason:
Many of us run BCPT flow with random customer data to get a better representation of the data that is used.
The problem with doing that is sometimes some items/customers/vendors have very special setting that makes a confirmation or message popup. In order to tackle that we do message/confirmation handlers.

But since this does not always occur we get an error for every time we didn't use the handler. An event like this can give us the possibility to skip that error if we want it.

I have seen some argument that is up to the developer to create clean test cases where the handlers are always used. To some extent that is valid. But the other side of the coin is that we have to do a lot of code cloning to make those test distinct. But the worst part is that will pollute the the actual performance test. Because now we have to filter out the records which has these particular settings. Settings that wasn't meant to be filtered upon. This will lead to that the slowest functions are those that prepares the data in the test and that makes the performance test quite useless since we can't measure the realistic flows.

[Bug]: BCPT - Log Message is missing from Telemetry

Describe the issue

I didn't notice this yesterday, but the "message" field is also missing in Telemetry.

Expected behavior

"Message" field in telemetry

Steps to reproduce

Create an entry in Telemetry from BCPT

Additional context

I'll fix it.

[Bug]: Edit-In Excel module should externalize field names for API consumption the same way the Platform does

Describe the issue

Edit-In Excel module does not externalize page field names the same way the platform does, when the field name contains an apostrophe.
For a page field defined as:

field("new vendor's name"; rec."New Vendor's Name")
{
	ApplicationArea = All;
}

The platform will externalize this name as new_vendor_x0027_s_name while the Edit-In Excel module will externalize it as new_vendor_s_name.

Expected behavior

Within reason the platform and the Edit-In Excel module should externalize fields the same way to avoid discrepancies between the API metadata and the Edit-In Excel field bindings.

Steps to reproduce

Create a page field with an apostrophe in its name on a card page, then try to export its corresponding list page using Edit-In Excel and observe the error dialog in the Excel side pane where add-ins are loaded.

Additional context

Error as it appears when following the reproduction steps above:

image

How we would like it to look when fixed:
image

Create Reminders with Include Entries On Hold does not create Reminders if only one customer

Please include the following with each issue:

1. Describe the bug
When a new Sales Invoice(overdue) is posted for a Customer that has no overdue Invoices or Reminders and you place a On Hold code on the newly created overdue customer ledger entry.
When trying to create reminders with include entries on hold it does not create a reminder for this newly created overdue customer ledger entry with a On Hold Code, although we have include entries on hold selected.

2. To Reproduce

  1. Create an overdue Sales Invoice for a Customer that has no overdue Invoices or Reminders, post the invoice.
  2. Add value to "On Hold" field on this Customer Ledger Entry
  3. Go to Reminders and try to create reminders and Include Entries On Hold (Reminders > Process > Create Reminders)

3. Expected behavior
The Reminder is created for the Customer Legder Entry with a On Hold code

4. Actual behavior
There is no reminder created.

5. Versions:

  • AL Language: v12.1887908
  • Visual Studio Code: 1.83.1
  • Business Central: BC SaaS 23.0.12034.13735-w1

[Bug]: Missing captions in the recurrence schedule

Describe the issue

On the page Recurrence Schedule there are missing captions in the groups MonthlySpecificDay, MonthlyByWeekday, YearlySpecificDay, YearlyByWeekday

Expected behavior

Captions are added

Steps to reproduce

Open page reccurence schedule

Additional context

I already have a code fixed and want to create a pull request for it

[BC Idea]: Page Styles as Enum

BC Idea Link

https://experience.dynamics.com/ideas/idea/?ideaid=95bf2064-f7cf-ee11-92bd-6045bdb614a3

Description

Please add an Enum which represents the Page Style Expressions similar to the enum of the Cue Styles: enum 9701 "Cues And KPIs Style"

I have already added multiple times the same enum in different Apps to acchieve this but it would he helpful for us developer to have this in the system application.

The new enum should have the values described here:

https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-style-property?wt.mc_id=d365bc_inproduct_alextension

I will provide the implementation for this BC Idea

  • I will provide the implementation for this BC Idea
    Internal work item: AB#502123

[Extensibility Request/BC Idea]: Remove access internal on some BCPT oBJECTS

BC Idea Link

none

Description

In the BCPTHeader/Lines table the access is set to internal which is just unnecessary.
Well I know that the developer wanted us to "hide" the object by making us work against BCPTTestSuite Codeunit instead. Good reason, but in fact that just creates extra work for us developers who want/need to work/extend those tables.

If any developers need to do that we should be able to do so.
My reason is that I'm working on an BCPT app with test cases in my local docker. When deploying from VS code it always runs the the installation codeunit. I would like to add a test to an existing test suite if it doesn't already exist. Currently I can't do that.

[BC Idea]: Add Telemetry to TEST framework to be able to gather TEST status, and also performance data during normal test runs.

BC Idea Link

https://ThisWasNotNecessaryForJesper.com

Description

Pretty much something like:

codeunit 70502 "Telemetry On Tests"
{
    SingleInstance = true;

    var
        SignalCollection: List of [Dictionary of [Text, Text]];
        NoOfSQLStatements: Dictionary of [Text, Integer];
        NoOfReads: Dictionary of [Text, Integer];
        DateTimes: Dictionary of [Text, DateTime];
        TestSuiteEventIdLbl: label 'WLD00001', Locked = true;
        AfterRunTestSuiteLbl: Label 'Test Suite Finished.';
        TestCodeunitEventIdLbl: label 'WLD00002', Locked = true;
        AfterRunTestCodeunitLbl: Label 'Test Codeunit Finished.';
        TestMethodEventIdLbl: label 'WLD00003', Locked = true;
        AfterRunTestMethodLbl: Label 'Test Method Finished.';
        TotalNoOfSQL, TotalNoOfRds : Integer;
        TotalDuration: Duration;

    #region TestSuiteSignals
    var
        TestSuiteIdentifier: Text;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Test Runner - Mgt", OnRunTestSuite, '', false, false)]
    local procedure OnRunTestSuite(var TestMethodLine: Record "Test Method Line");
    begin
        clear(SignalCollection);

        TestSuiteIdentifier := GetMeasureIdentifier(TestMethodLine, TestSuiteEventIdLbl);

        StartMeasure(TestSuiteIdentifier);
    end;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Test Runner - Mgt", OnAfterRunTestSuite, '', false, false)]
    local procedure OnAfterRunTestSuite(var TestMethodLine: Record "Test Method Line");
    begin
        EndMeasure(TestMethodLine, TestSuiteEventIdLbl, AfterRunTestSuiteLbl, TestSuiteIdentifier);

        SendTelemetry();
    end;
    #endregion

    #region TestCodeunitSignals
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Test Runner - Mgt", OnBeforeCodeunitRun, '', false, false)]
    local procedure OnBeforeCodeunitRun(var TestMethodLine: Record "Test Method Line");
    begin
        StartMeasure(GetMeasureIdentifier(TestMethodLine, TestCodeunitEventIdLbl));
    end;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Test Runner - Mgt", OnAfterCodeunitRun, '', false, false)]
    local procedure OnAfterCodeunitRun(var TestMethodLine: Record "Test Method Line");
    begin
        EndMeasure(TestMethodLine, TestCodeunitEventIdLbl, AfterRunTestCodeunitLbl);
    end;
    #endregion

    #region TestMethodSignals
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Test Runner - Mgt", OnBeforeTestMethodRun, '', false, false)]
    local procedure OnBeforeTestMethodRun(var CurrentTestMethodLine: Record "Test Method Line"; CodeunitID: Integer; CodeunitName: Text[30]; FunctionName: Text[128]; FunctionTestPermissions: TestPermissions);
    begin
        StartMeasure(GetMeasureIdentifier(CurrentTestMethodLine, TestMethodEventIdLbl));
    end;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Test Runner - Mgt", OnAfterTestMethodRun, '', false, false)]
    local procedure OnAfterTestMethodRun(var CurrentTestMethodLine: Record "Test Method Line"; CodeunitID: Integer; CodeunitName: Text[30]; FunctionName: Text[128]; FunctionTestPermissions: TestPermissions; IsSuccess: Boolean);
    begin
        EndMeasure(CurrentTestMethodLine, TestMethodEventIdLbl, AfterRunTestMethodLbl);
    end;
    #endregion

    local procedure EndMeasure(var TestMethodLine: Record "Test Method Line"; EventId: Text; message: Text)
    var
        MeasureIdentifier: Text;
    begin
        MeasureIdentifier := GetMeasureIdentifier(TestMethodLine, EventId);

        EndMeasure(TestMethodLine, EventId, message, MeasureIdentifier);
    end;

    local procedure EndMeasure(var TestMethodLine: Record "Test Method Line"; EventId: Text; message: Text; MeasureIdentifier: Text)
    var
        TelemetryCustomDimensions: Dictionary of [Text, Text];
        OldStartTime: DateTime;
    begin
        if DateTimes.Get(MeasureIdentifier, OldStartTime) then
            TotalDuration := CurrentDateTime - OldStartTime
        else
            TotalDuration := 0;

        if NoOfSQLStatements.Get(MeasureIdentifier, TotalNoOfSQL) then
            TotalNoOfSQL := SessionInformation.SqlStatementsExecuted - TotalNoOfSQL
        else
            TotalNoOfSQL := 0;

        if NoOfReads.Get(MeasureIdentifier, TotalNoOfRds) then
            TotalNoOfRds := SessionInformation.SqlRowsRead - TotalNoOfRds
        else
            TotalNoOfRds := 0;

        if TotalDuration = 0 then
            TotalDuration := TestMethodLine."Finish Time" - TestMethodLine."Start Time";

        AddTelemetryToCollection(TestMethodLine, EventId, message, TelemetryCustomDimensions);
    end;

    local procedure AddTelemetryToCollection(var TestMethodLine: Record "Test Method Line"; EventId: Text; message: Text; var TelemetryCustomDimensions: Dictionary of [Text, Text]);
    begin
        clear(TelemetryCustomDimensions);
        TelemetryCustomDimensions.Add('eventId', EventId);
        TelemetryCustomDimensions.Add('message', message);

        TelemetryCustomDimensions.Add('TestSuiteName', TestMethodLine."Test Suite");
        TelemetryCustomDimensions.Add('Result', format(TestMethodLine.Result));
        if TestMethodLine.result = TestMethodLine.Result::Failure then begin
            TelemetryCustomDimensions.Add('ErrorMessage', TestMethodLine."Error Message Preview");
            TelemetryCustomDimensions.Add('ErrorCode', TestMethodLine."Error Code");
        end;
        TelemetryCustomDimensions.Add('Name', TestMethodLine.Name);
        if TestMethodLine."Test Codeunit" <> 0 then
            TelemetryCustomDimensions.Add('CodeunitId', format(TestMethodLine."Test Codeunit"));
        if TestMethodLine.Function <> '' then
            TelemetryCustomDimensions.Add('MethodName', TestMethodLine.Function);
        TelemetryCustomDimensions.Add('StartTime', format(TestMethodLine."Start Time", 0, 9));
        TelemetryCustomDimensions.Add('EndTime', format(TestMethodLine."Finish Time", 0, 9));
        TelemetryCustomDimensions.Add('NoOfSQLStatements', format(TotalNoOfSQL, 0, 9));
        TelemetryCustomDimensions.Add('NoOfReads', format(TotalNoOfRds, 0, 9));
        TelemetryCustomDimensions.Add('DurationMs', format(TotalDuration / 1, 0, 9));

        SignalCollection.Add(TelemetryCustomDimensions);
    end;

    local procedure SendTelemetry()
    var
        Telemetry: Codeunit Telemetry;
        Signal: Dictionary of [Text, Text];
        eventId, message : Text;
    begin
        foreach Signal in SignalCollection do begin
            eventId := Signal.Get('eventId');
            Signal.Remove('eventId');

            message := Signal.Get('message');
            Signal.Remove('message');

            Telemetry.LogMessage(eventId, message, Verbosity::Normal, DataClassification::SystemMetadata, TelemetryScope::All, Signal);
        end;
    end;

    local procedure GetMeasureIdentifier(var TestMethodLine: Record "Test Method Line"; Identifier: Text): Text
    var
        IdentifierLbl: Label '%1-%2-%3', Locked = true, comment = '%1=Identifier, %2=TestSuite, %3=LineNo';
    begin
        exit(StrSubstNo(IdentifierLbl, Identifier, TestMethodLine."Test Suite", TestMethodLine."Line No."));
    end;

    local procedure StartMeasure(MeasureIdentifier: Text)
    var
        OldStartTime: DateTime;
        OldSQLCount, OldReadCount : Integer;
    begin
        if DateTimes.Get(MeasureIdentifier, OldStartTime) then
            DateTimes.Set(MeasureIdentifier, CurrentDateTime)
        else
            DateTimes.Add(MeasureIdentifier, CurrentDateTime);

        if NoOfSQLStatements.Get(MeasureIdentifier, OldSQLCount) then
            NoOfSQLStatements.Set(MeasureIdentifier, SessionInformation.SqlStatementsExecuted)
        else
            NoOfSQLStatements.Add(MeasureIdentifier, SessionInformation.SqlStatementsExecuted);

        if NoOfReads.Get(MeasureIdentifier, OldReadCount) then
            NoOfReads.Set(MeasureIdentifier, SessionInformation.SqlRowsRead)
        else
            NoOfReads.Add(MeasureIdentifier, SessionInformation.SqlRowsRead);
    end;
}

Codeunit 1483 XmlWriter lacks some overloads for WriteElementString()

🕮 Codeunit 1483 XmlWriter lacks some overloads for WriteElementString()

The .NET framework provides a number of overloads for XmlWriter.WriteElementString() that accept a prefix/namespace. WriteStartElement in codeunit 1483 has an overload with Prefix and Namespace, but WriteElementString() does not. I would like to add two overloads for WriteElementString() in codeunit 1483, analogous to the .NET interface.

🔧 To Reproduce
Compare codeunit 1483 with https://learn.microsoft.com/en-us/dotnet/api/system.xml.xmlwriter.writeelementstring?view=net-7.0.

📣 Expected behavior
Overloads available to .NET developers also available to AL developers.

[Bug]: First use of FeatureManagement.IsEnabled() method require COMMIT even if feature key is disabled

Describe the issue

If you run FeatureManagement.IsEnabled on fresh database, new Feature Key Update Data record will be automatically created. As there is not COMMIT after that, running tests on fresh database for the features using feature keys may raise an error about transaction and test will fail. This is important when we run tests for both old and new implementations of something, managed by feature key.

Expected behavior

This change should fix this issue and let tests runs normally if new feature is still disabled.

Steps to reproduce

Run tests for Exchange Rate Adjustment on fresh database, without opening page Feature Management.

Additional context

None

Event Request on Changing Password

🕮 Describe the issue
I would like to add an event that allows you to implement password policy on old and new password while changing your user passwords

🔧 To Reproduce

The current code only has only one integration event to modify password minimum length only

📣 Expected behavior

The current code works fine, this is an additional feature. You can then check that users don't reenter their old passwords asthe new password

Screenshots
image

Additional context

Add any other context about the problem here.

[Bug]: BlobClient.PutBlockList() unusable

Describe the issue

While working with Azure Blob Services API module I found some inconsistencies and after analyzing it I want to share it.

The point is that PutBlockList cannot be used now.

procedure PutBlockList(CommitedBlocks: Dictionary of [Text, Integer]; UncommitedBlocks: Dictionary of [Text, Integer]): Codeunit "ABS Operation Response"

According to the documentation:
image

But at the same time PutBlock operation is not represented in the ABSBlobClient codeunit. Which makes it impossible to use the PutBlockList() method.

What is interesting is that in the implementation this method already exists and all we have to do is add it to the ABSBlobClient interface.

procedure PutBlock(SourceContentVariant: Variant; BlockId: Text): Codeunit "ABS Operation Response"

In addition, I think that the PutBlockList() method lacks the BlobName parameter because it is not clear at what point this name is implicitly received by ABSOperationPayload.

ABSOperationResponse := ABSWebRequestHelper.PutOperation(ABSOperationPayload, HttpContent, StrSubstNo(PutBlockOperationNotSuccessfulErr, ABSOperationPayload.GetBlobName()));

Expected behavior

This should work so that we can make multiple PutBlocks with a unique identifier in Base64 and then modify/add the blocks we need to get one initial Blob consisting of these blocks.

As example:

Put first uncommitted block:

curl --location --request PUT 'https://beedynamics.blob.core.windows.net/cronususainc/1/test1.txt?{SAS}&comp=block&blockid=MQ%3D%3D' \
--header 'x-ms-blob-type: BlockBlob' \
--header 'Content-Type: text/plain' \
--data 'part1'

Put second uncommitted block:

curl --location --request PUT 'https://beedynamics.blob.core.windows.net/cronususainc/1/test1.txt?{SAS}&comp=block&blockid=Mg%3D%3D' \
--header 'x-ms-blob-type: BlockBlob' \
--header 'Content-Type: text/plain' \
--data 'part2'

Commit two blocks as one Blob:

curl --location --request PUT 'https://beedynamics.blob.core.windows.net/cronususainc/1/test1.txt?{SAS}&comp=blocklist' \
--header 'Content-Type: application/xml' \
--data '<BlockList>  
  <Uncommitted>MQ==</Uncommitted>
  <Uncommitted>Mg==</Uncommitted>
</BlockList>  '

Steps to reproduce

Try to use PutBlockList

Additional context

I originally wanted to send a PR with a fix, but judging by the rules it has to be negotiated in Issue first. And yes I know AppendBlock works in a similar way and it works fine.

I will provide a fix for a bug

  • I will provide a fix for a bug

Item Tracking Lines Scanning issue

When scanning item tracking lines, the page does not go beyond 50-53 lines, without manual intervention.

This can be reproduced by opening item tracking, making lines with 1 in quantity, until down arrow does not go to next line.

This blocks scanning from going to the next line, and is very annoying.

Action required: migrate or opt-out of migration to GitHub inside Microsoft

Migrate non-Open Source or non-External Collaboration repositories to GitHub inside Microsoft

In order to protect and secure Microsoft, private or internal repositories in GitHub for Open Source which are not related to open source projects or require collaboration with 3rd parties (customer, partners, etc.) must be migrated to GitHub inside Microsoft a.k.a GitHub Enterprise Cloud with Enterprise Managed User (GHEC EMU).

Action

✍️ Please RSVP to opt-in or opt-out of the migration to GitHub inside Microsoft.

❗Only users with admin permission in the repository are allowed to respond. Failure to provide a response will result to your repository getting automatically archived.🔒

Instructions

Reply with a comment on this issue containing one of the following optin or optout command options below.

✅ Opt-in to migrate

@gimsvc optin --date <target_migration_date in mm-dd-yyyy format>

Example: @gimsvc optin --date 03-15-2023

OR

❌ Opt-out of migration

@gimsvc optout --reason <staging|collaboration|delete|other>

Example: @gimsvc optout --reason staging

Options:

  • staging : This repository will ship as Open Source or go public
  • collaboration : Used for external or 3rd party collaboration with customers, partners, suppliers, etc.
  • delete : This repository will be deleted because it is no longer needed.
  • other : Other reasons not specified

Need more help? 🖐️

Add "GetSeed" to "Library - Random"

Describe the request

When working with random values it could be more helpful if you can output the current seed to the error message by getting it:

image

(Or would it be possible to output the current seed by default at the stored error message in the test tool?)

It would help at analyzing errors by knowing which seed got used to reproduce the error (by setting it for example at the beginning of the test and then debug)

Additional context

see above

[Confirm Management] Procedure without the DefaultButton argument

🕮 Describe the issue

The codeunit 27 "Confirm Management" does not provide a procedure with only the ConfirmQuestion: Text argument.

The good thing about this is that we have to think about what value to put in this procedure.

On the other hand, we have so many other examples where we don't want to put a value to the argument, leaving it false. Haven't counted the number of uses yet.

🔧 To Reproduce

-/-

📣 Expected behavior

Similar to the provided Confirm(String: Text, [Default: Boolean], [Value1: Wildcard, ...]): Boolean function, we would expect a procedure that does not require a DefaultButton argument and takes it as false.

procedure GetResponse(ConfirmQuestion: Text): Boolean
begin
    GetResponse(ConfirmQuestion, false);
end;

Screenshots

-/-

Additional context

Just learned about this codeunit yesterday, as it is implemented by the LinterCop by Stefan Maroń as a rule LC0021.

[Bug]: Pull Request Validation does not support all Github Keywords for Work Item Validation

Describe the issue

Currently we have to write Fixes

Expected behavior

It should be possible to use all GitHub Formats

  • close
  • closes
  • closed
  • fix
  • fixes
  • fixed
  • resolve
  • resolves
  • resolved

Steps to reproduce

Create a PR and use a wrong keyword for linking an issue

Additional context

https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

[Extensibility Request / Idea] Graph API Module

BC Idea Link

https://experience.dynamics.com/ideas/idea/?ideaid=2972d343-f481-ee11-a81c-6045bd860893

Description

🕮 Describe the issue
I created this issue to discuss about an improvement for the system application by providing an Graph API module for communction with the Microsoft Graph API.

As a starter there should be some kind of IMsGraphAuthorization interface.

And a RestWrapper (MsGraphAPIClient to Post/Patch/Delete request to any specified endpoint of the graph API.

Maybe some Authoriziation Codeunits can be reused in this module.
I'm thinking about the BlobStorage Authorization or the SharePoint Authorization.

I would be willing to provide a first draft for this module, but I could need some help on writing tests, since I don't know to test generic external API calls.

Additional context
Original PR on ALAppExtensions: microsoft/ALAppExtensions#22919

Internal work item: AB#477759

[Bug]: Azure File Share ListDirectory not returning all files

Describe the issue

The new Azure File Share functionality introduced in BC23.3 is a great new addition. Unfortunately, the ListDirectory function only returns the first 5000 files in the share and does not implement the Next Marker feature.

Expected behavior

The API for the Azure File Share indicates that the ListDirectory will return only the first 5000 files in a shared folder, and it returns a NextMarker string in the response if there are further files to be listed. This NextMarker can be used on subsequent requests to retrieve the remaining files

https://learn.microsoft.com/en-us/rest/api/storageservices/list-directories-and-files

I would have expected this NextMarker to be part of the response from ListDirectory BC implementation. (It is present in the ListFileHandles function).

Steps to reproduce

Create an Azure File Share, and a folder containing more than 5000 items.
Call the AFSFileClient.ListDirectory, and the returned file list contains only the first 5000 items.

    Authorization := StorageServiceAuthorization.UseReadySAS(AzureStorageSetup."Shared Access Signature");
    AFSFileClient.Initialize(AccountName, FileShare, Authorization);
    AFSOperationResponse := AFSFileClient.ListDirectory(FolderName, TempAFSDirectoryContent);

It is not possible to retrieve a list of the remaining files.

Additional context

No additional context.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.