After new update of Business central Version 26.3, while enabled Calculate invoice discount in Sales & receivable setup,
if enabled workflow for sales order it went to approval but cannot release it.
This error will popup
I have just checked the code, this is due to after enable check invoice discount in sales & receivable setup, Calculate the invoice discount after setting status to pending approval but to update the invoice discount status should be in open mode.