ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 36 "Sales Header" OnBeforeConfirmReservationDateConflict

Open andersws opened this issue 5 years ago • 3 comments

Can you please add OnBeforeConfirmReservationDateConflict to Table 36 "Sales Header" in procedure UpdateSalesLinesByFieldNo?

if AskQuestion then begin
            Question := StrSubstNo(Text031, Field."Field Caption");
            if GuiAllowed and not GetHideValidationDialog then
                if DIALOG.Confirm(Question, true) then
                    case ChangedFieldNo of
                        FieldNo("Shipment Date"),
                        FieldNo("Shipping Agent Code"),
                        FieldNo("Shipping Agent Service Code"),
                        FieldNo("Shipping Time"),
                        FieldNo("Requested Delivery Date"),
                        FieldNo("Promised Delivery Date"),
                        FieldNo("Outbound Whse. Handling Time"):
                            // >>>>>>>>>>>>
                            //IsHandled := false;
                            //OnUpdateSalesLInesByFieldNoOnBeforeConfirmReservationDateConflict(ChangedFieldNo, IsHandled);
                            //If not IsHandled then
                            // <<<<<<<<<<<<
                            ConfirmReservationDateConflict();
                    end
                else
                    exit
        end;
[IntegrationEvent(false, false)]
local procedure OnUpdateSalesLInesByFieldNoOnBeforeConfirmReservationDateConflict(ChangedFieldNo: Integer; var IsHandled: Boolean)
begin
end;

andersws avatar Jul 02 '21 13:07 andersws

There is already an AskQuestion var that you can set by event in the start of this procedure to remove the confirm altogether, why can't you use that?

Stepanenko-Vadim avatar Jul 06 '21 08:07 Stepanenko-Vadim

Hi and thanks for answering.

We need to control whether the ConfirmReservationConflict procedure should be executed or not based on which Field that has been changed. The question should be asked either way. We have a workaround now using the OnBeforeUpdateSalesLinesByFieldNo procedure, but if we use that, we're required to duplicate some code. And we hope to avoid that :)

Please feel free to ask any further questions.

andersws avatar Jul 06 '21 16:07 andersws

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.

JesperSchulz avatar Jul 09 '21 11:07 JesperSchulz