I have a single modal page for creating, editing and deleting products.
When P2_TYPE = 'UPD' the update button is displayed, when P2_TYPE = 'DEL' the delete button is displayed, when P2_TYPE = 'ADD' the new button is displayed.
I have created a dynamic action when the page loads using javascript.
function cambiarTitulo(){
var type;
type = apex.item( "P2_TYPE" ).getValue();
if ((type == 'UPD' ) || (type == 'DEL' )){
apex.util.getTopApex().jQuery(".ui-dialog-content").dialog("option", "title", "Details")
}else{
apex.util.getTopApex().jQuery(".ui-dialog-content").dialog("option", "title", "New")
}
}
But it is not working, it does not change the title