[Bug][SubscriptionBilling] Assign Subscription Lines dialog does not identify the sales line it was opened for
Nobody has claimed this yet.
- Dominant language
- AL
- Stars
- 683
- Forks
- 459
- Avg merge
- 3d 26m
- Merged PRs (30d)
- 633
Description
Describe the issue
When an item on a sales line has Subscription Packages assigned, the Assign Subscription Lines dialog opens so the user can pick which packages to apply. The dialog does not say which sales line it belongs to.
With a single line that is tolerable, because there is only one line it could refer to. It becomes a real problem as soon as several lines with Subscription Packages are inserted in one action — exploding the BOM of a bundle item is the common case. The identical dialog then appears once per component line, and the user has to choose packages for a component they cannot identify. There is nothing on screen — no caption, no item number, no description — that distinguishes the first dialog from the second.
The page does have an area showing the item it applies to, but it is explicitly hidden when the page is opened from a sales line, which is exactly the situation where it is needed. The sales line itself is already handed to the page, so the information required to identify it is present and simply not displayed.
Affected objects:
- Page
8065 "Assign Service Commitments"—src/Apps/W1/Subscription Billing/App/Service Commitments/Pages/AssignServiceCommitments.Page.al - Codeunit
SalesSubscriptionLineMgmt—src/Apps/W1/Subscription Billing/App/Sales Service Commitments/Codeunits/SalesSubscriptionLineMgmt.Codeunit.al
Expected behavior
The dialog should identify the sales line it was opened for.
Actual: every invocation shows the bare caption Assign Subscription Lines, with the General group hidden because OpenedFromSalesLine is true.
Expected: the caption identifies the line by both SalesLine."No." and SalesLine.Description. The description is the essential part — bundle components can share an item number or be indistinguishable by number alone:
Assign Subscription Lines - 1000 · Conference table monitor
Proposed fix: add a DataCaptionExpression to page 8065 "Assign Service Commitments", following the pattern already used in the module (DataCaptionExpression = GetCaption(); in src/Apps/W1/Subscription Billing/App/Deferrals/Pages/CustomerContractDeferrals.Page.al and src/Apps/W1/Subscription Billing/App/Deferrals/Pages/VendorContractDeferrals.Page.al). GetCaption() returns the sales-line caption when OpenedFromSalesLine is true.
When the page is opened from a Subscription header via SetServiceObject (src/Apps/W1/Subscription Billing/App/Service Objects/Pages/ServiceObject.Page.al), the current behavior should be kept: the General group stays visible and no sales-line caption applies.
Secondary, optional: expose an integration event such as OnAfterGetCaption(SalesLine: Record "Sales Line"; ServiceObject: Record "Subscription Header"; var Caption: Text) so extensions built on Subscription Billing can enrich the caption with their own context, for example the parent bundle of the component currently being processed. The built-in caption is the primary fix; the event is only worthwhile if the team wants the extension point.
Steps to reproduce
- Create two items and assign a Subscription Package to each of them.
- Create a bundle item and add both items to its BOM.
- Create a sales order and add the bundle item on a sales line.
- Run Functions > Explode BOM on that line, so the two component lines are inserted.
- The
Assign Subscription Linesdialog (page8065 "Assign Service Commitments") opens twice, once per exploded component line. - Observe that both dialogs are indistinguishable: identical caption, no item number and no line description. The
Generalgroup is hidden because the page was opened from a sales line, so there is no way to tell which of the two components the packages are currently being offered for.
Additional context
No response
I will provide a fix for a bug
- I will provide a fix for a bug
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with page 8065 "Assign Service Commitments" and compare its caption handling with GetCaption() and DataCaptionExpression in CustomerContractDeferrals.Page.al and VendorContractDeferrals.Page.al. Reproduce the two-dialog BOM scenario, then verify that sales-line dialogs identify both number and description while Subscription Header openings retain their existing behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100