ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Create Event Request Table 27 OnBeforeCheckReqLine

Open Denushaponov opened this issue 3 years ago • 2 comments

Add the following procedure customization, please:

        local procedure CheckReqLine(CurrFieldNo: Integer)
        var
            IsHandled: Boolean;
        begin
            if "No." = '' then
                exit;

            OnBeforeCheckReqLine(IsHandled, Rec, CurrFieldNo);//new Event
            if IsHandled then
                exit;

            RequisitionLine.SetCurrentKey(Type, "No.");
            RequisitionLine.SetRange(Type, RequisitionLine.Type::Item);
            RequisitionLine.SetRange("No.", "No.");
            if not RequisitionLine.IsEmpty() then begin
                if CurrFieldNo = 0 then
                    Error(Text023, TableCaption(), "No.", RequisitionLine.TableCaption());
                if CurrFieldNo = FieldNo(Type) then
                    Error(CannotChangeFieldErr, FieldCaption(Type), TableCaption(), "No.", RequisitionLine.TableCaption());
            end;
        end;

        [IntegrationEvent(false, false)]
        local procedure OnBeforeCheckReqLine(var IsHandled: Boolean; Item: Record Item; CurrentFieldNo: Integer)
        begin
        end;

Denushaponov avatar Mar 08 '23 10:03 Denushaponov

@AlexanderYakunin Hello. Have you had a chance to review this request? Are there any updates on this?

NadiiaMelnyk-BC avatar Jun 06 '23 08:06 NadiiaMelnyk-BC

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. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 11042.

JesperSchulz avatar Jun 07 '23 08:06 JesperSchulz