Codeunit 132213 Library - Small Business

Application Test Library

src/Layers/W1/Tests/ApplicationTestLibrary/LibrarySmallBusiness.Codeunit.al53 procedures and triggers, in source order. Copyright (c) Microsoft Corporation. MIT

CreateCommentLine line 22

  1. 27validatesTable 97 Comment Line Table Name
  2. 28validatesTable 97 Comment Line No.
  3. 30validatesTable 97 Comment Line Line No.
  4. 30callsCodeunit 131000 Library - Utility GetNewLineNo
  5. 31writesTable 97 Comment Line Insert(true)

CreateSalesCommentLine line 34

  1. 53callsCodeunit 131000 Library - Utility GenerateRandomDate
  2. 54callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 55writesTable 44 Sales Comment Line Insert(true)

CreateCustomer line 58

  1. 60callsCodeunit 130509 Library - Sales CreateCustomer

CreateCustomerSalesCode line 63

  1. 66validatesTable 172 Standard Customer Sales Code Customer No.
  2. 67validatesTable 172 Standard Customer Sales Code Code
  3. 68writesTable 172 Standard Customer Sales Code Insert(true)

CreateCustomerTemplateLine line 71

  1. 75callsCodeunit 131903 Library - Rapid Start CreateConfigTemplateLine
  2. 76validatesTable 8619 Config. Template Line Field ID
  3. 77validatesTable 8619 Config. Template Line Field Name
  4. 79validatesTable 8619 Config. Template Line Default Value
  5. 81validatesTable 8619 Config. Template Line Default Value
  6. 81callsCodeunit 130440 Library - Random RandIntInRange
  7. 82validatesTable 8619 Config. Template Line Skip Relation Check
  8. 83writesTable 8619 Config. Template Line Modify(true)

CreateCustomerTemplate line 86

  1. 90callsCodeunit 131903 Library - Rapid Start CreateConfigTemplateHeader
  2. 91validatesTable 8618 Config. Template Header Table ID
  3. 92writesTable 8618 Config. Template Header Modify(true)
  4. 94callsCreateCustomerTemplateLine
  5. 96callsCreateCustomerTemplateLine
  6. 98callsCreateCustomerTemplateLine
  7. 99callsFindGenBusPostingGroup
  8. 100callsCreateCustomerTemplateLine
  9. 101callsCodeunit 130509 Library - Sales FindCustomerPostingGroup

CreateCurrencyExchangeRate line 104

  1. 107validatesTable 330 Currency Exchange Rate Currency Code
  2. 108validatesTable 330 Currency Exchange Rate Starting Date
  3. 109validatesTable 330 Currency Exchange Rate Exchange Rate Amount
  4. 109callsCodeunit 130440 Library - Random RandDec
  5. 110validatesTable 330 Currency Exchange Rate Relational Exch. Rate Amount
  6. 111callsCodeunit 130440 Library - Random RandDec
  7. 113writesTable 330 Currency Exchange Rate Insert(true)

CreateExtendedTextHeader line 116

  1. 119validatesTable 279 Extended Text Header Table Name
  2. 120validatesTable 279 Extended Text Header No.
  3. 121validatesTable 279 Extended Text Header Sales Invoice
  4. 122validatesTable 279 Extended Text Header Sales Quote
  5. 123writesTable 279 Extended Text Header Insert(true)

CreateExtendedTextLine line 126

  1. 131validatesTable 280 Extended Text Line Table Name
  2. 132validatesTable 280 Extended Text Line No.
  3. 133validatesTable 280 Extended Text Line Language Code
  4. 134validatesTable 280 Extended Text Line Text No.
  5. 136validatesTable 280 Extended Text Line Line No.
  6. 136callsCodeunit 131000 Library - Utility GetNewLineNo
  7. 137validatesTable 280 Extended Text Line Text
  8. 137callsCodeunit 131000 Library - Utility GenerateRandomCode
  9. 139writesTable 280 Extended Text Line Insert(true)

CreateItem line 142

  1. 144callsCodeunit 132201 Library - Inventory CreateItemWithUnitPriceAndUnitCost
  2. 144callsCodeunit 130440 Library - Random RandDecInDecimalRange

CreateItemAsService line 147

  1. 152callsCodeunit 132201 Library - Inventory CreateItem
  2. 154writesTable 27 Item Insert(true)
  3. 155validatesTable 27 Item Base Unit of Measure
  4. 155callsFindUnitOfMeasure
  5. 156validatesTable 27 Item Unit Price
  6. 156callsCodeunit 130440 Library - Random RandDecInDecimalRange
  7. 157validatesTable 27 Item Type
  8. 158validatesTable 27 Item Gen. Prod. Posting Group
  9. 160validatesTable 27 Item VAT Prod. Posting Group
  10. 162writesTable 27 Item Modify
  11. 163raisesOnBeforeCreateItemAsServiceItemGet

CreateJob line 167

  1. 169callsCodeunit 131920 Library - Job CreateJob

CreateResponsabilityCenter line 172

  1. 175validatesTable 5714 Responsibility Center Code
  2. 175callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 177writesTable 5714 Responsibility Center Insert

CreateSalesInvoiceHeader line 180

  1. 182callsCodeunit 130509 Library - Sales CreateSalesHeader

CreateSalesCrMemoHeader line 185

  1. 187callsCodeunit 130509 Library - Sales CreateSalesHeader

CreateSalesQuoteHeaderWithLines line 190

  1. 195callsCodeunit 130509 Library - Sales CreateSalesHeader
  2. 198callsCodeunit 130509 Library - Sales CreateSalesLine

CreateSalesQuoteHeader line 201

  1. 203callsCodeunit 130509 Library - Sales CreateSalesHeader

CreateSalesOrderHeader line 206

  1. 208callsCodeunit 130509 Library - Sales CreateSalesHeader

CreateSalesLine line 211

  1. 216callsCodeunit 130509 Library - Sales CreateSalesLine

CreatePurchaseInvoiceHeader line 219

  1. 221callsCodeunit 130512 Library - Purchase CreatePurchHeader

CreatePurchaseLine line 224

  1. 229callsCodeunit 130512 Library - Purchase CreatePurchaseLine

CreatePurchaseCrMemoHeader line 232

  1. 234callsCodeunit 130512 Library - Purchase CreatePurchHeader

CreateStandardSalesCode line 237

  1. 240validatesTable 170 Standard Sales Code Code
  2. 243callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 245callsCodeunit 131000 Library - Utility GetFieldLength
  4. 246validatesTable 170 Standard Sales Code Description
  5. 247writesTable 170 Standard Sales Code Insert(true)

CreateStandardSalesLine line 250

  1. 255validatesTable 171 Standard Sales Line Standard Sales Code
  2. 257validatesTable 171 Standard Sales Line Line No.
  3. 257callsCodeunit 131000 Library - Utility GetNewLineNo
  4. 258writesTable 171 Standard Sales Line Insert(true)

CreateStandardPurchaseCode line 261

  1. 264validatesTable 173 Standard Purchase Code Code
  2. 267callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 269callsCodeunit 131000 Library - Utility GetFieldLength
  4. 270validatesTable 173 Standard Purchase Code Description
  5. 271writesTable 173 Standard Purchase Code Insert(true)

CreateStandardPurchaseLine line 274

  1. 279validatesTable 174 Standard Purchase Line Standard Purchase Code
  2. 281validatesTable 174 Standard Purchase Line Line No.
  3. 281callsCodeunit 131000 Library - Utility GetNewLineNo
  4. 282writesTable 174 Standard Purchase Line Insert(true)

CreateVendor line 285

  1. 287callsCodeunit 130512 Library - Purchase CreateVendor

CreateVendorPurchaseCode line 290

  1. 293validatesTable 175 Standard Vendor Purchase Code Vendor No.
  2. 294validatesTable 175 Standard Vendor Purchase Code Code
  3. 295writesTable 175 Standard Vendor Purchase Code Insert(true)

CreateVendorTemplate line 298

  1. 302callsCodeunit 131903 Library - Rapid Start CreateConfigTemplateHeader
  2. 303validatesTable 8618 Config. Template Header Table ID
  3. 304writesTable 8618 Config. Template Header Modify(true)
  4. 306callsCreateVendorTemplateLine
  5. 308callsCreateVendorTemplateLine
  6. 310callsCreateVendorTemplateLine
  7. 311callsFindGenBusPostingGroup
  8. 312callsCreateVendorTemplateLine
  9. 313callsCodeunit 130512 Library - Purchase FindVendorPostingGroup

CreateVendorTemplateLine line 316

  1. 320callsCodeunit 131903 Library - Rapid Start CreateConfigTemplateLine
  2. 321validatesTable 8619 Config. Template Line Field ID
  3. 322validatesTable 8619 Config. Template Line Field Name
  4. 324validatesTable 8619 Config. Template Line Default Value
  5. 326validatesTable 8619 Config. Template Line Default Value
  6. 326callsCodeunit 130440 Library - Random RandIntInRange
  7. 327validatesTable 8619 Config. Template Line Skip Relation Check
  8. 328writesTable 8619 Config. Template Line Modify(true)

FindVATBusPostingGroupZeroVAT line 347

  1. 356callsCreateZeroVATPostingSetupByProdGroupCode

PostSalesInvoice line 360

  1. 362callsCodeunit 130509 Library - Sales PostSalesDocument

PostPurchaseInvoice line 365

  1. 367callsCodeunit 130512 Library - Purchase PostPurchaseDocument

UpdatePurchHeaderDocTotal line 370

  1. 374runsCodeunit 415 Release Purchase Document
  2. 378writesTable 38 Purchase Header Modify(true)
  3. 379callsCodeunit 415 Release Purchase Document Reopen

SetInvoiceDiscountToCustomer line 382

  1. 386callsCodeunit 131300 Library - ERM CreateInvDiscForCustomer
  2. 387validatesTable 19 Cust. Invoice Disc. Discount %
  3. 388writesTable 19 Cust. Invoice Disc. Modify(true)

SetInvoiceDiscountToVendor line 391

  1. 395callsCodeunit 131300 Library - ERM CreateInvDiscForVendor
  2. 396validatesTable 24 Vendor Invoice Disc. Discount %
  3. 397writesTable 24 Vendor Invoice Disc. Modify(true)

SetVATBusPostingGrPriceSetup line 400

  1. 411validatesTable 325 VAT Posting Setup VAT Bus. Posting Group
  2. 412validatesTable 325 VAT Posting Setup VAT Prod. Posting Group
  3. 413writesTable 325 VAT Posting Setup Insert

CreateVATPostingSetup line 417

  1. 419callsCodeunit 131300 Library - ERM CreateVATPostingSetupWithAccounts
  2. 420callsCodeunit 130440 Library - Random RandIntInRange

CreateGLAccount line 423

  1. 425callsCodeunit 131300 Library - ERM CreateGLAccountNo

FindVATProdPostingGroupZeroVAT line 428

  1. 437callsCreateZeroVATPostingSetupByBusGroupCode

CreateGLAccountWithPostingSetup line 441

  1. 447callsCreateVATPostingSetup
  2. 449callsCreateGLAccount
  3. 450validatesTable 15 G/L Account Name
  4. 451validatesTable 15 G/L Account Direct Posting
  5. 452validatesTable 15 G/L Account VAT Bus. Posting Group
  6. 453validatesTable 15 G/L Account VAT Prod. Posting Group
  7. 454writesTable 15 G/L Account Modify

CreateZeroVATPostingSetupByProdGroupCode line 457, local

  1. 462validatesTable 323 VAT Business Posting Group Code
  2. 464callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 466writesTable 323 VAT Business Posting Group Insert
  4. 468callsCreateZeroVATPostingSetup

CreateZeroVATPostingSetupByBusGroupCode line 471, local

  1. 476validatesTable 324 VAT Product Posting Group Code
  2. 478callsCodeunit 131000 Library - Utility GenerateRandomCode
  3. 480writesTable 324 VAT Product Posting Group Insert
  4. 482callsCreateZeroVATPostingSetup

CreateZeroVATPostingSetup line 485, local

  1. 488validatesTable 325 VAT Posting Setup VAT Bus. Posting Group
  2. 489validatesTable 325 VAT Posting Setup VAT Prod. Posting Group
  3. 490validatesTable 325 VAT Posting Setup VAT Identifier
  4. 492callsCodeunit 131000 Library - Utility GenerateRandomCode
  5. 494validatesTable 325 VAT Posting Setup VAT %
  6. 495validatesTable 325 VAT Posting Setup Sales VAT Account
  7. 495callsCreateGLAccount
  8. 496validatesTable 325 VAT Posting Setup Purchase VAT Account
  9. 496callsCreateGLAccount
  10. 497writesTable 325 VAT Posting Setup Insert

InitGlobalDimCodeValue line 500

  1. 519callsCodeunit 131001 Library - Dimension CreateDimension
  2. 522callsCodeunit 131001 Library - Dimension CreateDimensionValue

FindSalesCorrectiveInvoice line 531

  1. 535callsTable 1900 Cancelled Document FindSalesCancelledCrMemo

FindSalesCorrectiveCrMemo line 539

  1. 543callsTable 1900 Cancelled Document FindSalesCancelledInvoice

FindPurchCorrectiveInvoice line 547

  1. 551callsTable 1900 Cancelled Document FindPurchCancelledCrMemo

FindPurchCorrectiveCrMemo line 555

  1. 559callsTable 1900 Cancelled Document FindPurchCancelledInvoice

MockCancelledDocument line 563

  1. 571writesTable 1900 Cancelled Document Insert

UpdateInvRoundingAccountWithSalesSetup line 574

  1. 580callsCodeunit 130509 Library - Sales GetInvRoundingAccountOfCustPostGroup
  2. 582validatesTable 252 General Posting Setup Sales Account
  3. 582callsCodeunit 131300 Library - ERM CreateGLAccountNo
  4. 583validatesTable 252 General Posting Setup Sales Credit Memo Account
  5. 583callsCodeunit 131300 Library - ERM CreateGLAccountNo
  6. 584writesTable 252 General Posting Setup Modify(true)

UpdateInvRoundingAccountWithPurchSetup line 587

  1. 593callsCodeunit 130509 Library - Sales GetInvRoundingAccountOfCustPostGroup
  2. 595validatesTable 252 General Posting Setup Purch. Account
  3. 595callsCodeunit 131300 Library - ERM CreateGLAccountNo
  4. 596validatesTable 252 General Posting Setup Purch. Credit Memo Account
  5. 596callsCodeunit 131300 Library - ERM CreateGLAccountNo
  6. 597writesTable 252 General Posting Setup Modify(true)

GetAvgDaysToPayLabel line 600

  1. 604callsCodeunit 32 Customer Card Calculations GetAvgDaysToPayLabel