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

[Question and Event Request] Handled Pattern Event Requests in Codeunit 12 #187

Closed
FSharpCSharp opened this issue Jan 3, 2018 · 3 comments
Labels
ships-in-future-update Fix ships in a future update

Comments

@FSharpCSharp
Copy link

I would like to use this issue to address the subject of the Codunit 12 in particular. In the "PostApply" function, there are various subfunctions that perform important posting functions. This includes, among other things, the discount calculation as well as the cash discount calculation. Some of these functions are also reused in other posting functions such as "PostCust" or "PostVend".
With the previously provided events it is unfortunately not possible to implement your own logic here. You would have to be able to "overwrite" functionalities in these routines. In this way, you could then also integrate your own discount calculation logic or cash discount logic (multi-level).

Is it possible to switch these functions to the handle pattern? concretely, this concerns the following functions:

  • "CalcPmtTolerance",
  • "CalcPmtDisc",
  • "CalcPmtDiscTolerance",
  • "CalcCurrencyApplnRounding",
  • "FindAmtForAppln",
  • "CalcCurrencyUnrealizedGainLoss",
  • "CalcCurrencyRealizedGainLoss",
  • "CalcApplication" and
  • "CalcAmtLCYAdjustment"

Information about the pattern can be found here

This would allow you to implement your own logic for these functions. This presupposes, of course, that you have to have access to all the internal functions from outside, so that you can take over a large part of the original in case of need.

I would like to know whether there is a general possibility that there will be a remedy here soon. Under these circumstances, user-defined adjustments to the booking processes are unfortunately not easily possible.

@FSharpCSharp FSharpCSharp changed the title [Question and Event Request] Handle Pattern Event Requests in Codeunit 12 [Question and Event Request] Handled Pattern Event Requests in Codeunit 12 Jan 3, 2018
@JesperSchulz
Copy link
Contributor

Thank you very much for your detailed suggestion. We most certainly need to work on making our posting codeunits more extensible, and your suggestion is an interesting option to achieve that. I have added the work to our backlog where it will get prioritized against other workloads. I hence cannot yet comment on when exactly we will be able to pick up this request. Thank you again for logging your issue!

@JannikBausager
Copy link

Could you provide some example of the business scenarios that will require replacement of the standard code. Is it for specific localization scenarios?

@StanislawStempin StanislawStempin transferred this issue from microsoft/AL Nov 1, 2018
@ikoletic ikoletic added the ships-in-future-update Fix ships in a future update label Dec 6, 2018
@ikoletic
Copy link

ikoletic commented Dec 6, 2018

Completed will ship in Dec/Jan update of BC

@ikoletic ikoletic closed this as completed Dec 6, 2018
@microsoft microsoft deleted a comment from jobulsin Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ships-in-future-update Fix ships in a future update
Projects
None yet
Development

No branches or pull requests

4 participants