Code Sample for Changing the Behavior of a Save Button
The following code customizes the Save button on the Account Edit page so that the code changes the owner of the record:
oraclecrmod.onReady(
function(){
if(oraclecrmod.ctx.isObject("Account") && oraclecrmod.ctx.isEditPage()){
var btnSave = oraclecrmod.getButton("BTN_TB_AccountEditForm_Save");
if(btnSave != null){
btnSave.offAll("click").on("click",function(){
//set on screen value api to set the value.
oraclecrmod.getField('Owner Alias').setValue("User1");
btnSave.invokeDefault("click");
});
}
}
});