i want build a custom pop up for if the some field = Yes at record creation or changes to Yes at edit? Upon save a pop up should appear that says, "Some message." with just an x to close out. Upon closing the pop up, the record should save as is.
i want build a custom pop up for if the some field = Yes at record creation or changes to Yes at edit? Upon save a pop up should appear that says, "Some message." with just an x to close out. Upon closing the pop up, the record should save as is.
What you want is a "Confirmation" type alert.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_11.0/User_Interface/Alerts/
You can add this in an on change event in the record view so that when the user changes that field you check the value, if it's Yes then you send the Alert.
The custom controllers you want to build are in:
custom/modules/<yourmodule>/clients/base/view/record/record.php
and create view:
and custom/modules/<yourmodule>/clients/base/view/create/create.php
There are some examples of how to extend the record and create view controllers here:
FrancescaS
i want a "warning" type alert but when i click x to close out. Upon closing the pop up, the record should save.
record should not save until i click on X button on popup.
i want "Confirmation" type alert but i don't want confirm or cancel button i want only X button like "warning" type alert when i click on X button the record should save.
i want a "warning" type alert but when i click x to close out. Upon closing the pop up, the record should save.
record should not save until i click on X button on popup.
i want "Confirmation" type alert but i don't want confirm or cancel button i want only X button like "warning" type alert when i click on X button the record should save.
If you are going to save regardless, then I would use a "Warning" with the option:
autoClose: false
However, if the purpose is to force someone to acknowledge and therefore not save unless they do so, the Confirmation seems to be the way to go.
You can manipulate the words on the button, and maybe even hide the "Cancel" button by customizing the alert if needed.
Else you will need to try and extend SugarAlerts to add your own type of button, but that will be a lot more work.
Depending on the ultimate business process it may or may not be worth doing that.
FrancescaS