microsoft / microsoft/BCApps

[Event Request] Extend item mapping logic after importing purchase documents in E-Document Core

Open
#5,247 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Approved BCIdea event-request Team: Integrations
Dominant language
AL
Stars
683
Forks
459
Avg merge
3d 26m
Merged PRs (30d)
633

Description

BC Idea Link

https://github.com/microsoft/ALAppExtensions/issues/29259#issuecomment-3421542160

Description

All of our customers have requested the ability to map an item received in a purchase document (order or invoice) in E-Documents using additional fields beyond just Item Reference or GTIN Code.
For example, some have asked to map items based on the EAN Code, Description, Description 2, or even the Item Code. They would like us to implement a multi-layered mapping logic that finds the best possible match.

Although they will review the imported lines afterward, having these extra mapping steps would make the process much more efficient.
Currently, however, it is not possible to add additional logic to map the received item with an item in Business Central.

Describe the request

This is the standard code — codeunit 6140 "E-Doc. Import", local procedure CreatePurchaseDocumentFromImportedDocument(…):

Image

Could you please add a publisher similar to the following:

Image

Currently, we use a default G/L Account when the item cannot be found ΓÇö otherwise, the purchase document could not be created from the E-Document.
At the moment, if there is no Item Reference or GTIN Code, the default G/L Account is used.

However, we need to extend this logic to include additional mapping steps, so adding a publisher here would allow us to implement that extra logic.

Thank you, and have a great day!

I will provide the implementation for this BC Idea
  • I will provide the implementation for this BC Idea

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read codeunit 6140 "E-Doc. Import", especially the local procedure CreatePurchaseDocumentFromImportedDocument(...), to understand where item references and GTIN codes are evaluated. The requested outcome is an extension point at that mapping decision so additional item-matching logic can run before the default G/L Account fallback; verify the surrounding E-Document import behavior afterward.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.