2.12.5 How to prompt Confirmation Pop Up box


jQuery.sap.require("sap.m.MessageBox");
sap.m.MessageBox.confirm(
SelectedVendor,
function(evt){
console.log("confirm evt:"+evt);
if( evt=="OK" ){
setField("SelVendorNo",recordChosen.VendorNo);
setField("SelName",recordChosen.Name);
setField("SelStreet",recordChosen.Street);
setField("SelCity",recordChosen.City);
setField("SelPostCode",recordChosen.PostCode);
setField("SelEmail",recordChosen.Email);
setField("SelHSEC",recordChosen.HSEC);
setField("SelIndustry",recordChosen.Industry);

setField("ChosenVendorNo",getField("SelVendorNo"));
setField("ChosenVendorName",getField("SelName"));
setField("ChosenVendorStreet",getField("SelStreet"));
setField("ChosenVendorCity",getField("SelCity"));
setField("ChosenVendorPostCode",getField("SelPostCode"));
setField("ChosenVendorEmail",getField("SelEmail"));
setField("ChosenVendorHSECCategory",getField("SelHSEC"));
setField("VendorDetailsVisible",true);
setField("ContractSearchVisible",true);
setField("RBContractExistYes",false);
setField("RBContractExistNo",false);
goToPage("PRCreateId");

}else{
//Pressed CANCEL, do nothing
}
}
);