ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 39 Purchase Line – Description – OnValidate

Open ttaeufer opened this issue 7 years ago • 4 comments

Event Request] Table 39 Purchase Line – Description – OnValidate

Could we please have a publisher OnBeforeValidateDescriptionWithHandled in function Description – OnValidate() of Table 39 Purchase Line?

trigger OnValidate()
var
    Item: Record Item;
    ApplicationAreaMgmtFacade: Codeunit "Application Area Mgmt. Facade";
    FindRecordMgt: Codeunit "Find Record Management";
    ConfirmManagement: Codeunit "Confirm Management";
    ReturnValue: Text[50];
    DescriptionIsNo: Boolean;
    IsHandled: Boolean;
begin
    // >>>>
    IsHandled := false;
    OnBeforeValidateDescriptionWithHandled(var Rec, xRec, var IsHandled);
    if IsHandled then
        exit;
    // <<<<
    if Type = Type::" " then
        exit;

    if ("No." <> '') and (Type in [Type::Item, Type::"Charge (Item)"]) then begin
        case Type of
            Type::Item:
                begin
                    if (StrLen(Description) <= MaxStrLen(Item."No.")) and ("No." <> '') then
                        DescriptionIsNo := Item.Get(Description)
                    else
                        DescriptionIsNo := false;

                    if not DescriptionIsNo then begin

ttaeufer avatar Aug 27 '19 14:08 ttaeufer

This search by description functionality fixed, probably you don't need to disable it anymore

AlexanderYakunin avatar Oct 03 '19 15:10 AlexanderYakunin

Unfortunately, it's not just about the fix. We also have to deactivate the functionality due to our business logic like in table 37-„Sales Line.

ttaeufer avatar Oct 28 '19 10:10 ttaeufer

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

bc-ghost avatar Oct 29 '19 19:10 bc-ghost

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

bc-ghost avatar Oct 30 '19 07:10 bc-ghost