---
id: object/codeunit/10756-es
type: object
title: Codeunit 10756 "SII Management" (ES)
summary: Codeunit 10756 "SII Management" (ES) in the ES country layer (Microsoft.EServices.EDocument). 56 public procedures, 2 events, 5 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - es layer
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 61f6e8bf952945e44b1cd6ea8955fb3513c23d8368954f1078c5f8690ac64de8
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/ES/BaseApp/Local/SII/EServices/EDocument/SIIManagement.Codeunit.al
    title: src/Layers/ES/BaseApp/Local/SII/EServices/EDocument/SIIManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/es
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11152
    - change/bcapps/10735
    - change/bcapps/9643
object_type: codeunit
object_id: 10756
name: SII Management
namespace: Microsoft.EServices.EDocument
app: Base Application
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
country: ES
counts:
  fields: 0
  procedures: 71
  events: 2
  subscribers: 5
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 10756 "SII Management" (ES)

> Codeunit 10756 "SII Management" (ES) in the ES country layer (Microsoft.EServices.EDocument). 56 public procedures, 2 events, 5 event subscribers. Introduced in BC29, still in BC30.

ES country layer · Microsoft.EServices.EDocument · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/ES/BaseApp/Local/SII/EServices/EDocument/SIIManagement.Codeunit.al) · facts from BC29

An object of the [ES localization](../../localizations/es.md), not part of W1.

## Events published

- `OnBeforeGetNoTaxableSalesAmount(var NoTaxableEntry: Record "No Taxable Entry"; SourceNo: Code[20]; DocumentType: Option; DocumentNo: Code[20]; PostingDate: Date; IsService: Boolean; UseNoTaxableType: Boolean; IsLocalRule: Boolean; var NoTaxableAmount: Decimal; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnGetTaxPeriodOnElse(var TaxPeriod: Text; PostingDate: Date)` (integration)

## Event subscriptions

- OnSalesInvoicePageOpen subscribes to Page "Sales Invoice" OnOpenPageEvent
- OnPurchInvoicePageOpen subscribes to Page "Purchase Invoice" OnOpenPageEvent
- OnSalesCreditMemoPageOpen subscribes to Page "Sales Credit Memo" OnOpenPageEvent
- OnPurchCreditMemoPageOpen subscribes to Page "Purchase Credit Memo" OnOpenPageEvent
- HandleRegisterBusinessSetup subscribes to Codeunit "Guided Experience" OnRegisterManualSetup

## Procedures

- `IsSIISetupEnabled(): Boolean`
- `IsShowAdvancedActionsEnabled(): Boolean` (internal)
- `OpenSIIVATSetup(SetupNotification: Notification)`
- `DeactivateSIISetupNotification(var SetupNotification: Notification)`
- `GetSIIStyle(SIIState: Option Pending,Incorrect,Accepted,"Accepted With Errors","Communication Error",Failed,"Not Supported"): Text`
- `GetSalesIDType(CustNo: Code[20]; CorrectionType: Option; CorrDocNo: Code[20]): Integer`
- `GetPurchIDType(VendNo: Code[20]; CorrectionType: Option; CorrDocNo: Code[20]): Integer`
- `GetIDType(CountryCode: Code[20]; VATRegNo: Code[20]; IsNotInAEAT: Boolean; IsIntraCommunity: Boolean): Integer`
- `GetVendFromLedgEntryByGLSetup(VendorLedgerEntry: Record "Vendor Ledger Entry"): Code[20]`
- `GetCustFromLedgEntryByGLSetup(CustLedgerEntry: Record "Cust. Ledger Entry"): Code[20]`
- `GetNoTaxablePurchAmount(var NoTaxableAmount: Decimal; SourceNo: Code[20]; DocumentType: Option; DocumentNo: Code[20]; PostingDate: Date): Boolean`
- `GetNoTaxablePurchAmount(var NoTaxableAmount: Decimal; SourceNo: Code[20]; DocumentType: Option; DocumentNo: Code[20]; PostingDate: Date; IgnoreInSII: Boolean): Boolean`
- `GetNoTaxableSalesAmount(var NoTaxableAmount: Decimal; SourceNo: Code[20]; DocumentType: Option; DocumentNo: Code[20]; PostingDate: Date; IsService: Boolean; UseNoTaxableType: Boolean; IsLocalRule: Boolean): Boolean`
- `GetNoTaxableSalesAmount(var NoTaxableAmount: Decimal; SourceNo: Code[20]; DocumentType: Option; DocumentNo: Code[20]; PostingDate: Date; IsService: Boolean; UseNoTaxableType: Boolean; IsLocalRule: Boolean; IgnoreInSII: Boolean): Boolean`
- `GetBaseImponibleACosteRegimeCode(): Text`
- `SIIStateDrilldown(var SIIDocUploadState: Record "SII Doc. Upload State")`
- `IsVATEntryCashFlowBased(VATEntry: Record "VAT Entry"): Boolean`
- `IsDetailedLedgerCashFlowBased(DtldLedgerEntryRecRef: RecordRef): Boolean`
- `IsLedgerCashFlowBased(LedgerEntryRecRef: RecordRef): Boolean`
- `IsIntracommunity(CountryRegionCode: Code[10]): Boolean`
- `FindVatEntriesFromLedger(LedgerEntryRecRef: RecordRef; var VATEntry: Record "VAT Entry"): Boolean`
- `FindNoTaxableEntriesFromLedger(LedgerEntryRecRef: RecordRef; var NoTaxableEntry: Record "No Taxable Entry"): Boolean`
- `FindOriginalLedgerFromDetailedPaymentLedger(PaymentDetailedLedgerEntryRecRef: RecordRef; var SalesDocLedgerEntryRecRefOut: RecordRef)`
- `FindOriginalLedgerFromPaymentLedger(PaymentLedgerEntryRecRef: RecordRef; var SalesDocLedgerEntryRecRefOut: RecordRef)`
- `FindVatEntriesReferringToDocLedger(InvoiceDocLedgerEntryRecRef: RecordRef; var PaymentVATEntry: Record "VAT Entry"): Boolean`
- `FindDetailedPaymentApplicationLedgerFromLedger(PaymentDocLedgerEntryRecRef: RecordRef; var PaymentDetailedDocLedgerEntryRecRefOut: RecordRef; ApplicationDate: Date; DocNumber: Code[20]): Boolean`
- `FindDetailedLedgerFromVatEntry(var InvoiceDetailedDocLedgerEntryRecRefOut: RecordRef; InvoiceDocVATEntry: Record "VAT Entry"): Boolean`
- `FindLedgerFromVatEntry(var InvoiceDocLedgerEntryRecRefOut: RecordRef; InvoiceDocVATEntry: Record "VAT Entry")`
- `FindPaymentDetailedCustomerLedgerEntries(var PaymentDetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; CustLedgerEntry: Record "Cust. Ledger Entry"): Boolean`
- `FindPaymentDetailedVendorLedgerEntries(var PaymentDetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry"; VendorLedgerEntry: Record "Vendor Ledger Entry"): Boolean`
- `NoTaxableEntriesExistPurchase(var NoTaxableEntry: Record "No Taxable Entry"; SourceNo: Code[20]; DocumentType: Option; DocumentNo: Code[20]; PostingDate: Date): Boolean`
- `NoTaxableEntriesExistPurchase(var NoTaxableEntry: Record "No Taxable Entry"; SourceNo: Code[20]; DocumentType: Option; DocumentNo: Code[20]; PostingDate: Date; IgnoreInSII: Boolean): Boolean`
- `NoTaxableEntriesExistSales(var NoTaxableEntry: Record "No Taxable Entry"; SourceNo: Code[20]; DocumentType: Option; DocumentNo: Code[20]; PostingDate: Date; IsService: Boolean; UseNoTaxableType: Boolean; IsLocalRule: Boolean): Boolean`
- `NoTaxableEntriesExistSales(var NoTaxableEntry: Record "No Taxable Entry"; SourceNo: Code[20]; DocumentType: Option; DocumentNo: Code[20]; PostingDate: Date; IsService: Boolean; UseNoTaxableType: Boolean; IsLocalRule: Boolean; IgnoreInSII: Boolean): Boolean`
- `DoesPaymentDetailedLedgerCloseInvoice(PaymentDetailedLedgerEntryRecRef: RecordRef; IsCustomerPayment: Boolean): Boolean`
- `DoesPaymentLedgerCloseInvoice(PaymentLedgerEntryRecRef: RecordRef; IsCustomerPayment: Boolean): Boolean`
- `CountryIsLocal(CountryCode: Code[20]): Boolean`
- `CountryAndVATRegNoAreLocal(CountryCode: Code[20]; VATRegNo: Code[20]): Boolean`
- `IsDomesticCustomer(Customer: Record Customer): Boolean`
- `CustomerIsIntraCommunity(CustomerNo: Code[20]): Boolean`
- `VendorIsIntraCommunity(VendorNo: Code[20]): Boolean`
- `CombineOperationDescription(OperationDescription1: Text[250]; OperationDescription2: Text[250]; var Result: Text[500])`
- `SplitOperationDescription(OperationDescription: Text[500]; var Part1: Text[250]; var Part2: Text[250])`
- `CharIsCapitalLetter(Char: Char): Boolean`
- `IsAllowedSalesInvType(InvType: Option): Boolean`
- `IsAllowedServInvType(InvType: Option): Boolean` (obsolete 27.0: Moved to codeunit Serv. SII Management)
- `Run347DeclarationToGenerateCollectionsInCash()`
- `UpdateSIIInfoInSalesDoc(var SalesHeader: Record "Sales Header")`
- `UpdateSIIInfoInServiceDoc(var ServiceHeader: Record Microsoft.Service.Document."Service Header")` (obsolete 27.0: Moved to codeunit Serv. SII Management)
- `GetSalesSpecialSchemeCode(BillToCustomerNo: Code[20]; VATCountryRegionCode: Code[10]): Enum "SII Sales Special Scheme Code"`
- `UpdateSIIInfoInPurchDoc(var PurchaseHeader: Record "Purchase Header")`
- `MarkAsAccepted(var SIIHistory: Record "SII History")`
- `MarkDocumentAsAccepted(DocumentSource: Enum "SII Doc. Upload State Document Source"; DocumentType: Enum "SII Doc. Upload State Document Type"; DocumentNo: Code[20]; var FeedbackMessage: Text): Boolean` (internal)
- `MarkAsNotAccepted(var SIIHistory: Record "SII History")`
- `CountryIsNorthernIreland(CountryCode: Code[20]): Boolean`
- `GetTaxPeriod(PostingDate: Date): Text`

Plus 8 local procedures.

## Triggers

OnRun

## Recent changes

- 2026-09-08 [#11152 [29.x]Mark as Accepted in posted documents for Spanish SII](../../changes/bcapps/11152.md) (releases/29.x, BC29, feature)
- 2026-08-28 [#10735 [Slice-631381] Add Mark as Accepted in posted documents for Spanish SII](../../changes/bcapps/10735.md) (main, BC30, feature)
- 2026-07-23 [#9643 Update SII subscribers SkipMissingPermissions](../../changes/bcapps/9643.md) (main, BC30, fix)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

## Deprecations

- procedure IsAllowedServInvType: Pending 27.0 (#if not CLEAN27), "Moved to codeunit Serv. SII Management"
- procedure UpdateSIIInfoInServiceDoc: Pending 27.0 (#if not CLEAN27), "Moved to codeunit Serv. SII Management"

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "SII Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.

A ES country object, not part of W1: the default corpus does not have it; `bcatlas_list_countries` shows which countries the atlas has.
