{"title":"Page 8002 Extend Contract, extension points 29","url":"https://jonas-paprotka.de/ref/page/8002-extend-contract/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":"page","id":8002,"name":"Extend Contract","app":"Subscription Billing","url":"https://jonas-paprotka.de/ref/page/8002-extend-contract/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/page/8002-extend-contract/source/","path":"src/Apps/W1/Subscription Billing/App/Customer Contracts/Pages/ExtendContract.Page.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:8055":{"name":"Sub. Contracts Item Management","url":"https://jonas-paprotka.de/ref/codeunit/8055-sub-contracts-item-management/"},"table:8057":{"name":"Subscription Header","url":"https://jonas-paprotka.de/ref/table/8057-subscription-header/"},"codeunit:8075":{"name":"Extend Sub. Contract Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/8075-extend-sub-contract-mgt/"},"table:8055":{"name":"Subscription Package","url":"https://jonas-paprotka.de/ref/table/8055-subscription-package/"},"table:8058":{"name":"Item Subscription Package","url":"https://jonas-paprotka.de/ref/table/8058-item-subscription-package/"},"table:8015":{"name":"Usage Data Supplier Reference","url":"https://jonas-paprotka.de/ref/table/8015-usage-data-supplier-reference/"},"codeunit:8025":{"name":"Import And Process Usage Data","url":"https://jonas-paprotka.de/ref/codeunit/8025-import-and-process-usage-data/"},"page:8093":{"name":"Assign Service Comm. Packages","url":"https://jonas-paprotka.de/ref/page/8093-assign-service-comm-packages/"}},"procs":[{"name":"ExtendVendorContract.OnValidate","line":32,"kind":"trigger","steps":[[34,"call","ValidateExtendVendorContract",0]]},{"name":"UsageDataSupplierNo.OnValidate","line":44,"kind":"trigger","steps":[[46,"call","ValidateUsageSupplierNo",0]]},{"name":"SubscriptionDescription.OnAssistEdit","line":56,"kind":"trigger","steps":[[70,"call","LookupUsageDataSubscription",1]]},{"name":"VendorContractNo.OnLookup","line":81,"kind":"trigger","steps":[[83,"call","LookupVendorContract",0]]},{"name":"VendorContractNo.OnValidate","line":86,"kind":"trigger","steps":[[88,"call","GetVendorContract",0]]},{"name":"ExtendCustomerContract.OnValidate","line":107,"kind":"trigger","steps":[[109,"call","ValidateExtendCustomerContract",0]]},{"name":"CustomerContractNo.OnLookup","line":124,"kind":"trigger","steps":[[126,"call","LookupCustomerContract",0]]},{"name":"CustomerContractNo.OnValidate","line":129,"kind":"trigger","steps":[[131,"call","GetCustomerContract",0]]},{"name":"ItemNo.OnValidate","line":159,"kind":"trigger","steps":[[161,"call","ValidateItemNo",0],[162,"ext","codeunit",8055,"GetItemTranslation",3]]},{"name":"VariantCode.OnLookup","line":192,"kind":"trigger","steps":[[194,"call","LookupItemVariant",1]]},{"name":"AdditionalServiceCommitments.OnAssistEdit","line":203,"kind":"trigger","steps":[[205,"call","GetAdditionalServiceCommitments",0]]},{"name":"Quantity.OnValidate","line":216,"kind":"trigger","steps":[[218,"call","GetItemCost",0],[219,"ext","codeunit",8055,"GetSalesPriceForItem",6]]},{"name":"Perform Extension.OnAction","line":260,"kind":"trigger","steps":[[262,"call","ExtendContract",0]]},{"name":"OnOpenPage","line":279,"kind":"trigger","steps":[[283,"call","SetGlobalsFromParameters",0],[297,"call","FillTempServiceCommitmentPackage",0],[298,"call","ValidateExtendCustomerContract",0],[299,"call","ValidateExtendVendorContract",0],[300,"call","ValidateItemNo",0],[301,"call","ValidateUsageSupplierNo",0],[302,"call","ValidateSubscriptionEntryNo",0],[304,"call","CountTotalServiceCommitmentPackage",0]]},{"name":"OnQueryClosePage","line":308,"kind":"trigger","steps":[[311,"call","ExtendContract",0]]},{"name":"ExtendContract","line":316,"kind":"procedure","access":"local","params":0,"steps":[[321,"event","OnBeforeExtendContract",0],[333,"call","ErrorIfItemServCommPackageMissingForItem",0],[338,"ext","table",8057,"InsertFromItemNoAndCustomerContract",6],[339,"ext","table",8057,"SetUnitPriceAndUnitCostFromExtendContract",2],[340,"ext","codeunit",8075,"ExtendContract",8],[341,"ext","table",8057,"ResetCalledFromExtendContract",0]]},{"name":"ValidateExtendVendorContract","line":355,"kind":"procedure","access":"local","params":0,"steps":[[359,"call","GetVendorContract",0]]},{"name":"ValidateExtendCustomerContract","line":362,"kind":"procedure","access":"local","params":0,"steps":[[368,"call","GetCustomerContract",0],[369,"call","ValidateSellToCustomerNo",0]]},{"name":"LookupCustomerContract","line":372,"kind":"procedure","access":"local","params":0,"steps":[[379,"call","GetCustomerContract",0]]},{"name":"GetCustomerContract","line":383,"kind":"procedure","access":"local","params":0,"steps":[[390,"ext","codeunit",8055,"GetItemTranslation",3],[392,"ext","codeunit",8055,"GetSalesPriceForItem",6]]},{"name":"LookupVendorContract","line":395,"kind":"procedure","access":"local","params":0,"steps":[[399,"call","GetVendorContract",0]]},{"name":"GetVendorContract","line":403,"kind":"procedure","access":"local","params":0,"steps":[[409,"call","GetItemCost",0]]},{"name":"ValidateItemNo","line":412,"kind":"procedure","access":"local","params":0,"steps":[[425,"call","FillTempServiceCommitmentPackage",0],[428,"call","ErrorIfItemServCommPackageMissingForItem",0],[430,"call","GetItemCost",0],[431,"ext","codeunit",8055,"GetSalesPriceForItem",6],[432,"call","CountTotalServiceCommitmentPackage",0],[433,"call","ShowNotificationIfStandardSubscriptionPackageDoesNotContainUBBLine",1],[435,"event","OnAfterValidateItemNo",0]]},{"name":"ShowNotificationIfStandardSubscriptionPackageDoesNotContainUBBLine","line":438,"kind":"procedure","access":"local","params":1,"steps":[[446,"ext","table",8055,"FilterCodeOnPackageFilter",1],[446,"ext","table",8058,"GetAllStandardPackageFilterForItem",2],[447,"call","ShowNoStandardSubscriptionPackageNotification",3],[447,"call","GetNoUBBSubscriptionPackageFound2NotificationId",0]]},{"name":"ShowNotificationIfNoUBBSubscriptionPackageIsSelected","line":450,"kind":"procedure","access":"local","params":2,"steps":[[458,"call","ShowNotificationIfStandardSubscriptionPackageDoesNotContainUBBLine",1],[461,"call","ShowNoStandardSubscriptionPackageNotification",3],[461,"call","GetNoUBBSubscriptionPackageFoundNotificationId",0]]},{"name":"ShowNoStandardSubscriptionPackageNotification","line":465,"kind":"procedure","access":"local","params":3,"steps":[[471,"ext","table",8055,"ServCommPackageLineExists",0]]},{"name":"ValidateUsageSupplierNo","line":508,"kind":"procedure","access":"local","params":0,"steps":[[516,"call","ValidateExtendVendorContract",0]]},{"name":"ValidateSubscriptionEntryNo","line":519,"kind":"procedure","access":"local","params":0,"steps":[[534,"call","ValidateUsageSupplierNo",0],[537,"call","ValidateItemNo",0],[538,"ext","table",8015,"FindSupplierReference",3],[542,"call","ValidateItemNo",0],[546,"ext","table",8015,"FindSupplierReference",3],[550,"call","ValidateSellToCustomerNo",0],[555,"ext","codeunit",8025,"GetServiceCommitmentForSubscription",3]]},{"name":"GetItemCost","line":562,"kind":"procedure","access":"local","params":0,"steps":[[564,"ext","codeunit",8055,"CalculateUnitCost",1]]},{"name":"GetAdditionalServiceCommitments","line":567,"kind":"procedure","access":"local","params":0,"steps":[[571,"run","page",8093],[573,"call","CountSelectedServiceCommitmentPackages",0],[574,"call","ShowNotificationIfNoUBBSubscriptionPackageIsSelected",2],[575,"event","OnAfterGetAdditionalServiceCommitments",0]]},{"name":"FilterNonStandardServiceCommitmentPackage","line":578,"kind":"procedure","access":"local","params":1,"steps":[[591,"ext","table",8058,"GetPackageFilterForItem",3],[592,"ext","table",8055,"FilterCodeOnPackageFilter",1]]},{"name":"CountTotalServiceCommitmentPackage","line":595,"kind":"procedure","access":"local","params":0,"steps":[[599,"call","CountSelectedServiceCommitmentPackages",0]]},{"name":"FillTempServiceCommitmentPackage","line":612,"kind":"procedure","access":"local","params":0,"steps":[[617,"write",8055,"DeleteAll"],[618,"call","FilterNonStandardServiceCommitmentPackage",1],[622,"write",8055,"Insert"]]},{"name":"LookupUsageDataSubscription","line":656,"kind":"procedure","access":"local","params":1,"steps":[[660,"call","ValidateSubscriptionEntryNo",0]]}]}