Skip to content

E-Document Header History - change to modify if exists#5446

Merged
Groenbech96 merged 1 commit intomainfrom
bugs/612575
Nov 10, 2025
Merged

E-Document Header History - change to modify if exists#5446
Groenbech96 merged 1 commit intomainfrom
bugs/612575

Conversation

@Groenbech96
Copy link
Copy Markdown
Contributor

@Groenbech96 Groenbech96 commented Nov 10, 2025

We dont want to keep inserting on entries we have seen before. Just update the Purch Inv Header link to the new sample.

Summary

Work Item(s)

Fixes AB#612575

@Groenbech96 Groenbech96 requested a review from a team as a code owner November 10, 2025 12:00
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Nov 10, 2025
@github-actions github-actions bot added this to the Version 28.0 milestone Nov 10, 2025
@Groenbech96 Groenbech96 requested a review from Copilot November 10, 2025 12:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the vendor assignment history tracking mechanism to prevent duplicate records. The changes enable updating existing vendor assignment history entries instead of creating duplicates when the same vendor information (VAT ID, GLN, Address, Company Name) is already tracked.

  • Added a secondary key to enable efficient lookup of existing vendor assignment history records
  • Modified the insertion logic to update existing records or insert new ones based on whether a matching history entry exists

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
EDocVendorAssignHistory.Table.al Adds a secondary key (Key2) on vendor identification fields to support efficient lookup during upsert operations
EDocPurchaseHistMapping.Codeunit.al Implements upsert logic to prevent duplicate vendor assignment history records by checking for existing entries and updating them instead of always inserting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Groenbech96 Groenbech96 requested a review from darjoo November 10, 2025 12:58
@Groenbech96 Groenbech96 enabled auto-merge (squash) November 10, 2025 14:15
@Groenbech96 Groenbech96 merged commit 86f316c into main Nov 10, 2025
57 checks passed
@Groenbech96 Groenbech96 deleted the bugs/612575 branch November 10, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants