Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Sustainability subscribers broke a preview posting #27706

Open
1 task done
vlkov opened this issue Nov 26, 2024 · 0 comments
Open
1 task done

[Bug]: Sustainability subscribers broke a preview posting #27706

vlkov opened this issue Nov 26, 2024 · 0 comments

Comments

@vlkov
Copy link
Contributor

vlkov commented Nov 26, 2024

Describe the issue

Hello,
We have the next error on document preview posting.
Error message:
The binding of codeunit 6228 was unsuccessful. The codeunit has already been bound.

AL call stack:
"Sust. Purchase Subscriber"(CodeUnit 6225).OnAfterBindSubscription line 3 - Sustainability by Microsoft
"Gen. Jnl.-Post Preview"(CodeUnit 19).OnAfterBindSubscription(Event) line 2 - Base Application by Microsoft
"Gen. Jnl.-Post Preview"(CodeUnit 19).PreviewStart line 16 - Base Application by Microsoft
"Gen. Jnl.-Post Preview"(CodeUnit 19).Preview line 7 - Base Application by Microsoft

The issue related to extension Sustainability. This app added some tables to preview but it was not implemented correctly. When some error occurs in the preview posting the manual subscription codeunit stays already bound. So on the next run of preview posting, this error occurs.
I suggest fixing it and make like in codeunit 6496 "Serv. Posting Preview Binding" from the Base Application.

Basically, we need to use bindSubscription inside a if then and add a clear temporary record from the previous possible run.

Expected behavior

There is no error on the preview posting related to the already bounded codeunit 6228

Steps to reproduce

  1. Prepare a document that will cause a posting error.
  2. Run Preview posting.
  3. Run preview posting again

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug
@vlkov vlkov added the bug Something isn't working label Nov 26, 2024
@aholstrup1 aholstrup1 removed the bug Something isn't working label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants