Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

The PEPPOL BIS Billing test's Initialize() method called CompanyInfo.Get() without ensuring the record exists, causing test failures in clean database scenarios.

Changes

Added existence check before accessing Company Information record:

// Before
CompanyInfo.Get();

// After
if not CompanyInfo.Get() then begin
    CompanyInfo.Init();
    CompanyInfo.Insert();
end;

This follows standard AL pattern for setup records and ensures tests run regardless of initial database state.

Original prompt

Pull Request: #6267

There is an issue currently in they no company information record exist.

In the initialise method in the test, ensure it exists, and set some default values.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Copilot AI changed the title [WIP] Add default company information record in initialise method Ensure Company Information record exists in PEPPOL test initialization Jan 27, 2026
Copilot AI requested a review from Groenbech96 January 27, 2026 08:29
@Groenbech96 Groenbech96 marked this pull request as ready for review January 27, 2026 12:40
@Groenbech96 Groenbech96 requested a review from a team as a code owner January 27, 2026 12:40
@Groenbech96 Groenbech96 merged commit e435466 into private/magnushar/morepeppol Jan 27, 2026
1 check passed
@Groenbech96 Groenbech96 deleted the copilot/add-default-company-info branch January 27, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants