0

I want to delete the duplicate quote line items of a quote. When I'm trying to delete from UI, it is throwing error saying "You are not authorized to make these changes Opportunity is already closed." I checked in validation rule, code level and debug logs. Nowhere I'm able to find the root cause.

Relationship is like this, Opportunity--> Quote --> Quote Line Item.

Opportunity is already synced to the downstream system. So I'm not in the position to delete the entire opportunity and create a fresh one to overcome this.

Is this the expected behavior of salesforce? If yes, is there any way around to delete the redundant quote line items.

1
  • try unsync'ing the Quote first, then delete the duplicate QuoteLineItem
    – cropredy
    Commented Apr 22, 2023 at 14:44

1 Answer 1

0

Salesforce does restrict certain modifications to related records when an Opportunity is in a 'Closed Won' or 'Closed Lost' state. However, I'm not 100% sure if this behaviour for Quote Line Items is a standard Salesforce restriction.

Here are some suggestions:

  • Although you mentioned that you can't delete the Opportunity, consider temporarily changing its stage to an open stage, delete the duplicate quote line items, and then revert the stage back. This is sometimes enough to bypass the restrictions. But be cautious, especially if the Opportunity is synced to a downstream system.

  • Ensure the Quote associated with the Quote Line Items isn't in a locked or finalized status. If it is, try unlocking it, deleting the line items, and then re-locking if necessary.

  • Consider using a tool like Data Loader to delete the records. Sometimes, these tools can bypass certain UI restrictions.

  • Ensure the user trying to delete the line items owns the records or has the necessary permissions.

Hope this helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .