In Microsoft Dynamics 365 CRM, the "Deactivate" button on a subgrid is a system-generated button that cannot be directly renamed or modified. However, there are a couple of approaches you can take to achieve a similar outcome:
Hide the "Deactivate" button and create a custom button:
Hide the default "Deactivate" button by customizing the form and removing it from the subgrid's command bar.
Create a new button using the form editor and add it to the subgrid's command bar.
Customize the button's label, icon, and behavior according to your requirements.
Use JavaScript to dynamically rename the button:
Add a JavaScript web resource to the form where the subgrid is located.
Use JavaScript code to target the subgrid's command bar and find the "Deactivate" button element.
Modify the button's label or text using JavaScript, effectively renaming it.
Register the JavaScript function to run on the form's load event or any other appropriate event.
Here's an example of how you can use JavaScript to rename the "Deactivate" button on a subgrid: