Skip to content

[master] - Changing the contact of a Customer Subscription Contract doesn't update the email of the contract.#9712

Open
DhavalMore88 wants to merge 1 commit into
microsoft:mainfrom
DhavalMore88:bugs/Bug-643982-Main-Changing-the-contact-of-a-Customer-Subscription
Open

[master] - Changing the contact of a Customer Subscription Contract doesn't update the email of the contract.#9712
DhavalMore88 wants to merge 1 commit into
microsoft:mainfrom
DhavalMore88:bugs/Bug-643982-Main-Changing-the-contact-of-a-Customer-Subscription

Conversation

@DhavalMore88

@DhavalMore88 DhavalMore88 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Bug 643982: [master] [All-e] Changing the contact of a Customer Subscription Contract doesn't update the email of the contract.

AB#643982

Issue: When a Customer Subscription Contract's "Sell-to Contact No." is changed to a different contact, the contract's email ("Sell-to E-Mail") is not refreshed. It keeps the previous/customer email, so subscription communication can be sent to the wrong contact.

Cause: In the UpdateSellToCust procedure in CustomerSubscriptionContract.Table.al (invoked from the "Sell-to Contact No." OnValidate trigger), the resolved Contact record's details were never copied to the contract — the email/phone lines present in the standard BaseApp Sales Header pattern were omitted. The email was only ever populated from the Customer during "Sell-to Customer No." validation (CopySellToCustomerAddressFieldsFromCustomer), never from the selected contact.

Solution: Added "Sell-to Phone No." := Cont."Phone No."; and "Sell-to E-Mail" := Cont."E-Mail"; in UpdateSellToCust after the contact is resolved, mirroring the standard Sales Header behavior. Now any Validate("Sell-to Contact No.", ...) — from UI, AL, API, or background — overrides the contract email with the selected contact's email (strict override, including blank), while preserving existing validations and the OnAfterUpdateSellToCust event.

@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jul 24, 2026
@DhavalMore88
DhavalMore88 marked this pull request as ready for review July 24, 2026 11:33
@DhavalMore88
DhavalMore88 requested a review from a team July 24, 2026 11:33
@github-actions github-actions Bot added From Fork Pull request is coming from a fork Finance GitHub request for Finance area labels Jul 24, 2026
@github-actions github-actions Bot added the Linked Issue is linked to a Azure Boards work item label Jul 24, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Finance GitHub request for Finance area From Fork Pull request is coming from a fork Linked Issue is linked to a Azure Boards work item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants