SAP Message C2140 - Order &: Sales order & is assigned

Diagnosis
A sales order is assigned to the order. The setting in Customizing(maintain properties of system messages) prevents the deletion flagbeing set.