Codeunit


Codeunit 18008290 EOS Commission Setup Mgt.

Central management codeunit for Commission Setup configuration and feature flags. This codeunit serves as the single source of truth for all commission-related settings and feature flags. It uses SingleInstance to maintain consistent state across all calls within the same session. Key Responsibilities - Provides access to the Commission Setup record with caching for performance - Manages feature flags for Sales Network, New Sales Engine, Salesperson Integration - Controls internal state flags for table modification permissions - Handles feature flag registration and enable/disable logic Feature Flags Managed - New Salesperson Engine Controls the new salesperson management system - Sales Network Enables sales network functionality - Salesperson Integration Controls salesperson integration features Internal State Flags - SalespersonTreeModifiable Allows modifications to Salesperson Set Entry and Tree Node tables - RoleSalespersonSetsDeletable Allows deletion of Role-Salesperson Sets - DocumentBatchImportMode Enables batch import mode for documents - AutomatedTestsMode Indicates automated test execution Caching Strategy - Setup data is cached and refreshed every minute - Feature flags use tri-state (Undefined/True/False) for lazy loading - ForcedSetup flag bypasses normal cache refresh for testing Usage - Call IsNewSalesEngineEnabled(), IsSalesNetworkEnabled() to check feature status - Use SetSalespersonTreeModifiable(true) before modifying protected tables - Call GetCommissionsSetup() to retrieve cached setup record

Codeunit 18008291 EOS Commission Sales Doc. Mgt.

Gathers all functions used to handle data on documents

Codeunit 18008292 EOS Commission Salesp. Mgt

Gathers all functions used to handle additional salespersons

Codeunit 18008293 EOS Commission Calculation Mgt

Gathers all functions used to handle calculation routines

Codeunit 18008294 EOS Commission Utilities

Gathers all functions used to handle general needs

Codeunit 18008295 EOS Commission Event Mgt.

Gathers all functions used to handle subscriber events

Codeunit 18008296 EOS Commission Journal Mgt.

Gathers all functions used to handle journals

Codeunit 18008297 EOS Commission Jnl. Post

Gathers all functions used to handle journal post

Codeunit 18008298 EOS Commission Jnl. Post Batch

Gathers all functions used to handle journal post

Codeunit 18008299 EOS Commission Jnl. Check Line

Gathers all functions used to handle journal post

Codeunit 18008300 EOS Commission Jnl. Post Line

Gathers all functions used to handle journal post

Codeunit 18008301 EOS Commission Doc. Posting

Gathers all functions used to handle document posting process

Codeunit 18008302 EOS Comm. Event Publisher

Gathers all published events

Codeunit 18008303 EOS EX010 Core Mgt.

Codeunit 18008304 EOS Purchase Document Mgt.

Gathers all functions used to handle purchase documents creation/update

Codeunit 18008305 EOS Comm. Reduction Mgt.

Gathers all functions used to handle commission reduction

Codeunit 18008306 EOS Posting Preview Mgt.

Gathers all functions used to handle commission in posting preview function

Codeunit 18008307 EOS Subscription

Provides functions related to extension specific subscription management.

Codeunit 18008308 EOS Commission Calc Filter Mgt

Codeunit 18008309 EOS010 CMS Integration

Codeunit for managing Salesperson integration with external entities. Manages bidirectional synchronization between the EOS010 Salesperson Integration table and the Customer, Ship-to Address, and EOS Sales Network tables. This codeunit is SingleInstance to maintain the DisableNextLogging flag state across different calls during the same session.

Codeunit 18008310 EOS010 Salesp. Import Mgmt.

Codeunit for managing the import of salesperson data into Business Central. This codeunit handles the complete import process including - Validating imported salesperson records - Applying salesperson assignments to various sales documents and master data - Performing data quality checks after import - Managing status updates for imported records Supports import for Customer, Ship-to Address, Sales Header, Sales Line, Sales Invoice Header/Line, Sales Credit Memo Header/Line, and archived documents.

Codeunit 18008311 EOS010 Advanced Calc Filter

Codeunit for advanced filtering optimization in commission calculation. This codeunit provides an optimized filtering mechanism for the EOS Commissions Calc. Setup table by using SetID fields and caching strategies to improve performance when searching for matching commission calculation setup records. Key features - SingleInstance design pattern for persistent caching across calls - Manual event subscription for table insert/modify/delete/rename events - Regex-based detection of complex filter expressions (wildcards, ranges, operators) - Multi-level caching filter values, lookup table values, regex matches, and filter match results - Automatic cache invalidation with 60-second throttling to balance freshness and performance - Integration with EOS010 Filter Value Lookup table for unique ID assignment Usage 1. Call BindCodeunit() to activate event handling 2. Use SetAdvancedFilters() to apply optimized filters to commission setup queries 3. Call UnBindCodeunit() when event handling should be disabled The caching strategy - FilterValueCache Maps field numbers to dictionaries of filter values - FieldHasComplexFilter Tracks which fields contain complex filter expressions - LookupValueCache Maps text values to their unique IDs in the lookup table - RegexMatchCache Caches regex evaluation results for filter complexity detection - FilterMatchCache Caches filter match results for value-filter combinations

Codeunit 18008312 EOS010 Commission Setup Wizard

Codeunit 18008313 EOS010 Hide Confirmation

Codeunit 18008314 EOS010 Install

Codeunit 18008315 EOS010 CMS Upgrade

Codeunit 18008316 EOS010 CMS Telemetry

Codeunit 18008317 EOS010 Legacy Event Subscriber

Legacy Event Subscriber for Commission Management. This codeunit isolates all event subscribers related to the legacy salesperson/commission logic. Key Features - Uses Manual EventSubscriberInstance to allow dynamic binding/unbinding - Events are only active when the legacy sales engine is enabled - When the new sales engine is enabled, these subscribers are unbound to avoid performance impact Purpose This architecture allows the system to completely disable legacy event processing when the new engine is active, preventing unnecessary event handler execution and improving Business Central performance. All methods are marked as Obsolete and will be removed when the legacy engine is fully deprecated. Usage Call BindOrUnBindCodeunitIfNeeded() during setup initialization to activate/deactivate the legacy event subscribers based on commission setup configuration.

Codeunit 18008318 EOS010 Advanced Event Subscr.

Advanced Event Subscriber for Commission Management. This codeunit isolates event subscribers that are only needed when the new salesperson engine is active. Key Features - Uses Manual EventSubscriberInstance to allow dynamic binding/unbinding - Events are only active when the new sales engine is enabled - Prevents usage of legacy tables (e.g., “EOS Add. Salesperson/Purchaser”) when the new engine is active - Can be temporarily unbound on-demand to allow special operations (e.g., table truncate) Purpose This architecture serves two main purposes 1. Protect legacy data structures from being used when the new engine is active 2. Allow temporary disabling of protections when needed for maintenance operations (truncate, bulk operations, etc.) The manual binding allows these protective events to be disabled on-demand without affecting Business Central performance or blocking legitimate administrative operations. Usage - Call BindOrUnBindCodeunitIfNeeded() during setup initialization to activate/deactivate based on engine configuration - Call ForceUnbinding() temporarily before operations that need to bypass the protections (e.g., truncate legacy tables) - Re-bind after completing the special operation

Codeunit 18008320 EOS010 Salespersons Mngt

Core management codeunit for Salesperson Sets in the Commission system. This codeunit provides the central API for managing Salesperson Set structures, which represent collections of role-salesperson assignments that can be attached to various entities (Customers, Sales Documents, etc.). Key Responsibilities - Creating and retrieving Salesperson Set IDs from role-salesperson combinations - Managing Role-Salesperson Sets (the building blocks of Salesperson Sets) - Providing edit functionality for Salesperson Sets across different record types - Synchronizing Salesperson Set changes between headers and lines - Detecting and comparing changes between Salesperson Sets - Transferring salespersons between documents - Converting between different data representations (Dictionary, JSON, temporary records) Data Structures - Salesperson Set ID A unique integer identifying a specific combination of role-salesperson pairs - Role-Salesperson Set Individual role + salesperson code combination with a unique ID - Salesperson Set Entry Links Salesperson Set ID to individual role-salesperson values - Salesperson Set Tree Node Tree structure for efficient lookup and deduplication Supported Record Types - Customer, Ship-to Address - Sales Header, Sales Line - Sales Invoice Header, Sales Invoice Line - Sales Cr.Memo Header, Sales Cr.Memo Line - Sales Header Archive, Sales Line Archive - EOS Sales Network Note This codeunit uses SingleInstance for performance optimization. Protected tables are modified via CommissionSetupMgt.SetSalespersonTreeModifiable().

Codeunit 18008321 EOS010 SalesP Upgrade

Codeunit 18008322 EOS010 Posted Doc Update

Codeunit 18008323 EOS010 SalesP. Subscriptions

Event Subscribers for Salesperson management in the Commission system. This codeunit handles all table-level events for the salesperson-related tables, ensuring data integrity and enforcing business rules for the new sales engine. Key Responsibilities - Automatically creates Role-Salesperson Sets when new roles or salespersons are added - Prevents deletion/rename of roles and salespersons that are in use - Protects Salesperson Set Entry and Tree Node tables from unauthorized modifications - Blocks configuration package imports that could corrupt salesperson data structures Tables Managed - EOS Salesperson Role Synchronizes role-salesperson combinations - Salesperson/Purchaser Synchronizes salesperson-role combinations - EOS010 Salesperson Set Entry Protected from direct modifications - EOS010 Salesp. Set Tree Node Protected from direct modifications - EOS010 Role-Salesperson Sets Protected from unauthorized deletions Note This codeunit uses SingleInstance to maintain consistent state across calls. Modifications to protected tables require setting appropriate flags via CommissionSetupMgt.

Codeunit 18008324 EOS010 DataUpg ManualBinding

Codeunit 18008325 EOS010 SalesP JobQueue Upg


EOS Labs -