ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Function Expose] Codeunit 8612 - Config. Template Management - InsertTemplate

Open rvanbekkum opened this issue 7 years ago • 3 comments

Dear ALAppExtensions team,

Through this issue we would like to request to have procedure InsertTemplate from codeunit 8612 Config. Template Management to be made External.

rvanbekkum avatar Mar 15 '19 12:03 rvanbekkum

Hi R. van Bekkum. Just a very short question. Why do you need InsertTemplate as External, what is the case you try to cover? Does UpdateRecord from the same codeunit fit your needs?

RomanZanizdra avatar Apr 24 '19 13:04 RomanZanizdra

Hi @RomanZanizdra, We call the InsertTemplate in our code directly to create template records for tables that do allow for an empty key field in records (e.g., Variant Code (PK field) of SKU). The UpdateRecord procedure first calls the TestKeyFields to check what it needs to do, but if this procedure encounters an empty primary key field, then it returns false as well, which is not desirable for our case. To deal with this correctly, we call the InsertTemplate procedure directly.

rvanbekkum avatar Apr 26 '19 12:04 rvanbekkum

Ok. "Empty key" was the reason of my question. So if you understand what are doing then ok.

RomanZanizdra avatar Apr 26 '19 13:04 RomanZanizdra