Skip to content

Subscription billing app conflicts with IRS Forms app#4660

Merged
ventselartur merged 1 commit intomainfrom
bugs/SubbillingConflictsWithIRSFormsApp
Sep 2, 2025
Merged

Subscription billing app conflicts with IRS Forms app#4660
ventselartur merged 1 commit intomainfrom
bugs/SubbillingConflictsWithIRSFormsApp

Conversation

@ventselartur
Copy link
Copy Markdown
Contributor

@ventselartur ventselartur commented Sep 2, 2025

When Subscription Billing app creates a new billing document it validates the posting date. Then the IRS forms app, which is the US specific app, not related to subscription billing, run an update of certain fields related to this app. This kind of update in the IRS forms app from the other side triggers the Subscription billing app code - the PreventChangePurchaseHeader procedure. This procedure throws the following error:
You cannot make this change because the document is linked to a contract. If you still want to change the field, first delete this document and then make the change to the contract.

This procedure have a list of fields for exclusion. It would be great to add IRS forms app fields to the exclusion list, but that is not possible unless i create a dependency between these two apps, which does not make any sense.
The other approach which i eventually chose is to skip calling the PreventChangePurchaseHeader when i change the posting date. To me it sounds much better as we keep the procedure untouched, so we continue to call it whenever some user changes this value in the document. But if we validate the posting date through the code in the CreateBillingDocuments codeunit, we can skip this check.

AB#599229

@ventselartur ventselartur requested a review from a team as a code owner September 2, 2025 12:12
@ventselartur ventselartur added Bug Something isn't working Finance GitHub request for Finance area labels Sep 2, 2025
@github-actions github-actions bot added this to the Version 28.0 milestone Sep 2, 2025
Copy link
Copy Markdown
Contributor

@AndersLarsenMicrosoft AndersLarsenMicrosoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good

@ventselartur ventselartur merged commit 82921ff into main Sep 2, 2025
20 checks passed
@ventselartur ventselartur deleted the bugs/SubbillingConflictsWithIRSFormsApp branch September 2, 2025 14:27
miljance pushed a commit to miljance/BCApps that referenced this pull request Oct 22, 2025
When Subscription Billing app creates a new billing document it
validates the posting date. Then the IRS forms app, which is the US
specific app, not related to subscription billing, run an update of
certain fields related to this app. This kind of update in the IRS forms
app from the other side triggers the Subscription billing app code - the
PreventChangePurchaseHeader procedure. This procedure throws the
following error:
_You cannot make this change because the document is linked to a
contract. If you still want to change the field, first delete this
document and then make the change to the contract._

This procedure have a list of fields for exclusion. It would be great to
add IRS forms app fields to the exclusion list, but that is not possible
unless i create a dependency between these two apps, which does not make
any sense.
The other approach which i eventually chose is to skip calling the
PreventChangePurchaseHeader when i change the posting date. To me it
sounds much better as we keep the procedure untouched, so we continue to
call it whenever some user changes this value in the document. But if we
validate the posting date through the code in the CreateBillingDocuments
codeunit, we can skip this check.


[AB#599229](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/599229)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants