Recently ran into scenario where the rebate agreement can't be changed / expired. This looks like a very valid request. The fields are grayed out and there is nothing on form that allow update to these fields. During detailed review found out that if there are any rebates present on rebates form, then the rebate agreements can't be changed.

This seems like a good check in place but all the rebates are in completed status. But D365FO doesn't take that into consideration, it just look at if any rebates are present or not and not their statuses for a particular agreement.

In order to delete the rebates, use 'Purge rebates' functionality present under Sales and Marketing. It will help delete the rebates in bulk. Once rebates are deleted, the rebate agreements can now be changed/updated/expired to reflect latest changes.

While we are able to update the rebate agreements, we would lose all the rebates history from the rebates form. This is the downside to using purge rebates functionality to update Rebate agreements, if you would want to preserve your rebate history, you would need some customization's in this area.