1

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 ?

Damkulul
  • 1,406
  • 2
  • 25
  • 59

2 Answers2

1

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.

enter image description here

1

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.

Corey Sutton
  • 134
  • 3