I want to use Xrm.Utility.confirmDialog but I need to edit the button's text, is it optional ? if yes, how can I do that ?
Edit Xrm.Utility.confirmDialog button text
799 views Asked by Damkulul At
2
There are 2 answers
0
On
Further to @Arun Vinoth's answer, the JS to edit the button's text would look similar to:
const confirmStrings = {
cancelButtonLabel: "Cancel this change" // Cancel button text
confirmButtonLabel: "Confirm this change" // Confirm button text
};
Xrm.Navigation.openConfirmDialog(confirmStrings).then(...
You didn't specify which button you wish to edit, so both are included.
The previous version Xrm.Utility.confirmDialog does not have an option to customize the button label text. And its deprecated too.
Based on your CRM 2016 version - we don't have any supported way to achieve it.
Whereas the latest version Xrm.Navigation.openConfirmDialog is having that option to customize the button label text.