ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[extensibility-bug] procedure FillBufferInternal Table "Option Lookup Buffer"

Open TMEKUMA opened this issue 6 years ago • 2 comments

For the enums the function TypeHelper.GetNumberOfOptions is called. This function returns the number but not the actual enum values. This number will be used as key, but it is not possible to use the function IncludeOption.

    local procedure FillBufferInternal(TableNo: Integer; FieldNo: Integer; RelationFieldNo: Integer; LookupType: Option)
    var
        TypeHelper: Codeunit "Type Helper";
        RecRef: RecordRef;
        RelatedRecRef: RecordRef;
        FieldRef: FieldRef;
        FieldRefRelation: FieldRef;
        OptionIndex: Integer;
        RelatedTableNo: Integer;
    begin
        RecRef.Open(TableNo);
        FieldRef := RecRef.Field(FieldNo);
        for OptionIndex := 0 to TypeHelper.GetNumberOfOptions(FieldRef.OptionMembers) do begin
            FieldRef.Value(OptionIndex);
            if IncludeOption(LookupType, OptionIndex) then begin

TMEKUMA avatar Jul 28 '20 09:07 TMEKUMA

Please check latest code, this is already updated.

AlexanderYakunin avatar Jul 31 '20 07:07 AlexanderYakunin

Yes, the build 17.0.15215.0 contains different code than the build 17.0.14964.0. Thanks!

TMEKUMA avatar Aug 03 '20 08:08 TMEKUMA