AL icon indicating copy to clipboard operation
AL copied to clipboard

[Function Expose] Codeunit 905 “Assembly Line Management” – AddBOMLine2()

Open GaryFrostick opened this issue 8 years ago • 5 comments

Codeunit 905 “Assembly Line Management”

The function AddBOMLine2() needs to be made global/external. This function is important when working with assembly orders in extensions.

GaryFrostick avatar Sep 12 '18 16:09 GaryFrostick

Would AddBOMLine do the trick? It calls AddBOMLine2. Only difference is that it also creates and AsmLine. We're a little cautious about exposing local functions, as every local function we expose is limiting our ability to change and refactor our code going forward.

JesperSchulz avatar Sep 13 '18 10:09 JesperSchulz

AddBOMLine would do the trick in most circumstances. The only advantage with AddBOMLine2 is you can use it with temporary record sets.

GaryFrostick avatar Sep 14 '18 10:09 GaryFrostick

Would it be ok if I expose the public function instead of the local function then, in spite of the minor disadvantage? We need to turn the trend of exposing implementation details around. For now, I will do so. If that solution does not suffice, please let me know and I'll take one more look.

JesperSchulz avatar Sep 20 '18 07:09 JesperSchulz

Btw. is function AddBOMLine on TAB900 already exposed. This might unblock you until the function in COD905 is exposed?

JesperSchulz avatar Sep 20 '18 07:09 JesperSchulz

I think exposing the public function will be fine. Thanks for your help.

GaryFrostick avatar Sep 20 '18 08:09 GaryFrostick