This article talks on How to Show confirmation pop up on invoking method using Siebel Open UI (Only using PM File). on Form Applet.

This can be achieved in two steps.

STEP 1: Add the method

// Add your method inside INIT block.

this.AddMethod("InvokeMethod", PreInvokeMethod, {sequence: true, scope: this} )


STEP 2: Define the custom method with actions to perform on invoking it. In our case , it show confirmation popup

 function PreInvokeMethod(methodName , psInputArgs , ls, returnStructure){

        if(methodName=="Submit"){//PLEASE CHANGE THE METHOD NAME PER REQUIREMENT

            var bConfirm = confirm("Do you want to proceed?")// PLEASE CHANGE MSG PER NEED

            if(!bConfirm){

                returnStructure["CancelOperation"] = true;

                SiebelApp.S_App.uiStatus.Free();

            }}}.

PFB the complete PM file ConfirmationFormPM.js

=====

if (typeof(SiebelAppFacade.ConfirmationDetailPM) === "undefined") {


    SiebelJS.Namespace("SiebelAppFacade.ConfirmationDetailPM");

    define("siebel/custom/ConfirmationDetailPM", ["siebel/pmodel"],

     function () {

      SiebelAppFacade.ConfirmationDetailPM = (function () {

   

       function ConfirmationDetailPM(pm) {

        SiebelAppFacade.ConfirmationDetailPM.superclass.constructor.apply(this, arguments);

       }

   

       SiebelJS.Extend(ConfirmationDetailPM, SiebelAppFacade.PresentationModel);

   

       ConfirmationDetailPM.prototype.Init = function () {

        SiebelAppFacade.ConfirmationDetailPM.superclass.Init.apply(this, arguments);

        this.AddMethod("InvokeMethod", PreInvokeMethod, {sequence: true, scope: this} )

       }

       

       function PreInvokeMethod(methodName , psInputArgs , ls, returnStructure){

        if(methodName=="Submit"){//PLEASE CHANGE THE METHOD NAME PER REQUIREMENT

            var bConfirm = confirm("Do you want to proceed?")// PLEASE CHANGE MSG PER NEED

            if(!bConfirm){

                returnStructure["CancelOperation"] = true;

                SiebelApp.S_App.uiStatus.Free();

            }


        }

    }     

   

       return ConfirmationDetailPM;

      }()

     );

     return "SiebelAppFacade.ConfirmationDetailPM";

    })

   }

   ====

Please test and lets us know in comment section.

Thank you.