ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

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

Open FSharpCSharp opened this issue 8 years ago • 3 comments

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 avatar Jan 03 '18 14:01 FSharpCSharp

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!

JesperSchulz avatar Jan 18 '18 16:01 JesperSchulz

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

JannikBausager avatar May 18 '18 13:05 JannikBausager

Completed will ship in Dec/Jan update of BC

ikoletic avatar Dec 06 '18 12:12 ikoletic