---
title: "Codeunit 1217 Pre-map Incoming Purch. Doc"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/1217-pre-map-incoming-purch-doc/
type: codeunit
id: 1217
name: "Pre-map Incoming Purch. Doc"
app: "Base Application"
namespace: System.IO
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/1217-pre-map-incoming-purch-doc/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 1217 Pre-map Incoming Purch. Doc

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/1217-pre-map-incoming-purch-doc/

| | |
| --- | --- |
| App | Base Application |
| Namespace | System.IO |
| Versions | 17-28 |
| Source file | System/DataExchange/PremapIncomingPurchDoc.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| GetDocumentTypeOptionString | (Integer) | Text[250] | public | 17-28 | - | - |
| GetDocumentTypeOptionCaption | (Integer) | Text[250] | public | 17-28 | - | - |
| ConstructDocumenttypeUnknownErr | () | Text | public | 17-28 | - | - |
| FindAppropriateGLAccount | (Integer, Integer, Text[250], Decimal, Code[20]) | Code[20] | public | 17-28 | - | - |
| CorrectHeaderField | (Integer, Integer, Integer, Integer, Variant) | - | public | 25-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnBeforeInsertLineForTotalDocumentAmount | (Integer, var Boolean) | 17-28 | - | - |
| Integration event | OnFindGLAccountForLineOnBeforeFindAppropriateGLAccount | (Record Intermediate Data Import, var Code[20], Integer, Integer, Integer, Code[20], var Boolean) | 22-28 | - | - |
| Integration event | OnBeforeProcessLine | (Integer, Integer, Integer, Code[20], var Boolean) | 22-28 | - | - |
| Integration event | OnAfterCorrectHeaderData | (Integer, Integer, Record Data Exch., var Record Incoming Document) | 24-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
