{"title":"Codeunit 132210 Library - Templates, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/132210-library-templates/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":132210,"name":"Library - Templates","app":"Application Test Library","url":"https://jonas-paprotka.de/ref/codeunit/132210-library-templates/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/132210-library-templates/source/","path":"src/Layers/W1/Tests/ApplicationTestLibrary/LibraryTemplates.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:132210":{"name":"Library - Templates","url":"https://jonas-paprotka.de/ref/codeunit/132210-library-templates/"},"table:1383":{"name":"Vendor Templ.","url":"https://jonas-paprotka.de/ref/table/1383-vendor-templ/"},"codeunit:131000":{"name":"Library - Utility","url":"https://jonas-paprotka.de/ref/codeunit/131000-library-utility/"},"codeunit:130512":{"name":"Library - Purchase","url":"https://jonas-paprotka.de/ref/codeunit/130512-library-purchase/"},"codeunit:131300":{"name":"Library - ERM","url":"https://jonas-paprotka.de/ref/codeunit/131300-library-erm/"},"table:1381":{"name":"Customer Templ.","url":"https://jonas-paprotka.de/ref/table/1381-customer-templ/"},"codeunit:130509":{"name":"Library - Sales","url":"https://jonas-paprotka.de/ref/codeunit/130509-library-sales/"},"table:1382":{"name":"Item Templ.","url":"https://jonas-paprotka.de/ref/table/1382-item-templ/"},"codeunit:132201":{"name":"Library - Inventory","url":"https://jonas-paprotka.de/ref/codeunit/132201-library-inventory/"},"table:1384":{"name":"Employee Templ.","url":"https://jonas-paprotka.de/ref/table/1384-employee-templ/"},"table:5221":{"name":"Employee Posting Group","url":"https://jonas-paprotka.de/ref/table/5221-employee-posting-group/"},"table:5212":{"name":"Employee Statistics Group","url":"https://jonas-paprotka.de/ref/table/5212-employee-statistics-group/"},"codeunit:131001":{"name":"Library - Dimension","url":"https://jonas-paprotka.de/ref/codeunit/131001-library-dimension/"},"codeunit:130440":{"name":"Library - Random","url":"https://jonas-paprotka.de/ref/codeunit/130440-library-random/"}},"procs":[{"name":"DisableTemplatesFeature","line":23,"kind":"procedure","params":0,"steps":[[27,"ext","codeunit",132210,"SetTemplatesFeatureEnabled",1]]},{"name":"EnableTemplatesFeature","line":30,"kind":"procedure","params":0,"steps":[[34,"ext","codeunit",132210,"SetTemplatesFeatureEnabled",1]]},{"name":"CreateVendorTemplate","line":37,"kind":"procedure","params":1,"steps":[[40,"validate",1383,"Code"],[40,"ext","codeunit",131000,"GenerateRandomCode",2],[41,"validate",1383,"Description"],[42,"write",1383,"Insert",1]]},{"name":"CreateVendorTemplateWithData","line":45,"kind":"procedure","params":1,"steps":[[52,"call","CreateVendorTemplate",1],[54,"ext","codeunit",130512,"CreateVendorPostingGroup",1],[55,"ext","codeunit",131300,"FindGeneralPostingSetupInvtFull",1],[56,"ext","codeunit",131300,"FindVATPostingSetupInvt",1],[57,"ext","codeunit",131300,"FindPaymentMethod",1],[59,"validate",1383,"Vendor Posting Group"],[60,"validate",1383,"Gen. Bus. Posting Group"],[61,"validate",1383,"VAT Bus. Posting Group"],[62,"validate",1383,"Payment Method Code"],[63,"validate",1383,"Payment Terms Code"],[63,"ext","codeunit",131300,"FindPaymentTermsCode",0],[64,"write",1383,"Modify",1]]},{"name":"CreateVendorTemplateWithDataAndDimensions","line":67,"kind":"procedure","params":1,"steps":[[69,"call","CreateVendorTemplateWithData",1],[70,"call","CreateTemplateGlobalDimensions",2],[71,"call","CreateTemplateDimensions",2]]},{"name":"CreateCustomerTemplate","line":74,"kind":"procedure","params":1,"steps":[[77,"validate",1381,"Code"],[77,"ext","codeunit",131000,"GenerateRandomCode",2],[78,"validate",1381,"Description"],[79,"write",1381,"Insert",1]]},{"name":"CreateCustomerTemplateWithData","line":82,"kind":"procedure","params":1,"steps":[[89,"call","CreateCustomerTemplate",1],[91,"ext","codeunit",130509,"CreateCustomerPostingGroup",1],[92,"ext","codeunit",131300,"FindGeneralPostingSetupInvtFull",1],[93,"ext","codeunit",131300,"FindVATPostingSetupInvt",1],[94,"ext","codeunit",131300,"FindPaymentMethod",1],[96,"validate",1381,"Customer Posting Group"],[97,"validate",1381,"Gen. Bus. Posting Group"],[98,"validate",1381,"VAT Bus. Posting Group"],[99,"validate",1381,"Payment Method Code"],[100,"validate",1381,"Payment Terms Code"],[100,"ext","codeunit",131300,"FindPaymentTermsCode",0],[101,"write",1381,"Modify",1]]},{"name":"CreateCustomerTemplateWithDataAndDimensions","line":104,"kind":"procedure","params":1,"steps":[[106,"call","CreateCustomerTemplateWithData",1],[107,"call","CreateTemplateGlobalDimensions",2],[108,"call","CreateTemplateDimensions",2]]},{"name":"CreateItemTemplate","line":111,"kind":"procedure","params":1,"steps":[[114,"validate",1382,"Code"],[114,"ext","codeunit",131000,"GenerateRandomCode",2],[115,"validate",1382,"Description"],[116,"write",1382,"Insert",1]]},{"name":"CreateItemTemplateWithData","line":119,"kind":"procedure","params":1,"steps":[[126,"call","CreateItemTemplate",1],[129,"ext","codeunit",132201,"CreateInventoryPostingGroup",1],[130,"ext","codeunit",131300,"FindGeneralPostingSetupInvtFull",1],[131,"ext","codeunit",131300,"FindVATPostingSetupInvt",1],[132,"ext","codeunit",132201,"CreateUnitOfMeasureCode",1],[134,"validate",1382,"Inventory Posting Group"],[135,"validate",1382,"Gen. Prod. Posting Group"],[136,"validate",1382,"VAT Prod. Posting Group"],[137,"validate",1382,"Base Unit of Measure"],[138,"write",1382,"Modify",1]]},{"name":"CreateItemTemplateWithDataAndDimensions","line":141,"kind":"procedure","params":1,"steps":[[143,"call","CreateItemTemplateWithData",1],[144,"call","CreateTemplateGlobalDimensions",2],[145,"call","CreateTemplateDimensions",2]]},{"name":"CreateEmployeeTemplate","line":148,"kind":"procedure","params":1,"steps":[[151,"validate",1384,"Code"],[151,"ext","codeunit",131000,"GenerateRandomCode",2],[152,"validate",1384,"Description"],[153,"write",1384,"Insert",1]]},{"name":"CreateEmployeeTemplateWithData","line":156,"kind":"procedure","params":1,"steps":[[161,"call","CreateEmployeeTemplate",1],[164,"validate",5221,"Code"],[164,"ext","codeunit",131000,"GenerateRandomCode",2],[165,"write",5221,"Insert"],[168,"validate",5212,"Code"],[168,"ext","codeunit",131000,"GenerateRandomCode",2],[169,"write",5212,"Insert"],[171,"validate",1384,"Employee Posting Group"],[172,"validate",1384,"Statistics Group Code"],[173,"write",1384,"Modify",1]]},{"name":"CreateEmployeeTemplateWithDataAndDimensions","line":176,"kind":"procedure","params":1,"steps":[[178,"call","CreateEmployeeTemplateWithData",1],[179,"call","CreateTemplateGlobalDimensions",2],[180,"call","CreateTemplateDimensions",2]]},{"name":"CreateTemplateGlobalDimensions","line":183,"kind":"procedure","params":2,"steps":[[190,"ext","codeunit",131001,"GetGlobalDimCodeValue",2],[191,"ext","codeunit",131001,"CreateDefaultDimension",5]]},{"name":"CreateTemplateDimensions","line":195,"kind":"procedure","params":2,"steps":[[201,"ext","codeunit",130440,"RandIntInRange",2],[202,"ext","codeunit",131001,"CreateDimWithDimValue",1],[203,"ext","codeunit",131001,"CreateDefaultDimension",5]]},{"name":"UpdateTemplatesVATGroups","line":212,"kind":"procedure","params":0,"steps":[[219,"ext","codeunit",131300,"FindVATPostingSetup",2],[222,"write",1381,"ModifyAll"],[224,"write",1383,"ModifyAll"],[226,"write",1382,"ModifyAll"]]}]}