How to setup default value as NO for Confirmation dialog in API ?

julkifli33julkifli33 Member Posts: 1,060
Hi all...
I am using cloud BC and publish the page.
but sometimes upon modify (my case is Posting Date), there is a confirmation dialog.
2z0chlabpu2x.png

in BC, I want it to be NO
but unfortunately there is no confirmation dialog if validate via API.

Are we able to set as No in API?
Thanks before.

Best Answer

  • mohana_cse06mohana_cse06 HyderabadMember Posts: 5,496
    Answer ✓
    As per standard code, if it is coming via API then by default option will be Yes.

    You can try with the below code to skip changing the lines

    [EventSubscriber(ObjectType::Table, Database::"Sales Header", 'OnBeforeUpdateSalesLinesByFieldNo', '', false, false)]
    local procedure OnBeforeUpdateSalesLinesByFieldNo(var SalesHeader: Record "Sales Header"; ChangedFieldNo: Integer; var AskQuestion: Boolean; var IsHandled: Boolean; xSalesHeader: Record "Sales Header"; CurrentFieldNo: Integer);
    var
    SalesLine: Record "Sales Line";
    begin
    if ChangedFieldNo = SalesLine.FieldNo("Deferral Code") then
    IsHandled := not GuiAllowed;
    end;

Answers

Sign In or Register to comment.