17 QuoteLineItem records were loaded into the org via Dataloader with the incorrect product2id listed.

When trying to delete the records in the GUI while logged in as a System Administrator, the following error message is received:

"There's a problem saving this record. You might not have permission to 
edit it, or it might have been deleted or archived. Contact your 
administrator for help."

When trying to delete the records through execute anonymous Apex in the developer console while logged in as a System Administrator, the following error message is received:

"Line: 1, Column: 1
System.DmlException: Delete failed. First exception on row 0 with id 
... first error: INSUFFICIENT_ACCESS_OR_READONLY, insufficient access 
rights on object id: []"

Things already verified:

(Note: QLI = QuoteLineItem)

  • The QLIs can be viewed in the GUI ("not deleted") and isDeleted is set to false. They don't appear to have an "archived" option according to the Salesforce SOAP documentation. The Quotes they belong to are similarly not deleted, nor do they appear to have an "archived" option.
  • The Product2Ids and PricebookEntryIds associated with the QLI are not inactive or archived.
  • The Quotes do have the correct Pricebook2Id.
  • Deletion was always attempted using the System Administrator profile, it was verified that all fields on Quote, QuoteLineItem, Opportunity, and OpportunityLineItem were viewable and editable by this profile (except for those that cannot be edited regardless of the permissions, obviously).
  • The Quotes are in "Draft" status.
  • On the one QLI record I'm focusing my testing on for now (after earlier spot checks), there is not a OpportunityLineItemId populated, nor is there an OpportunityId populated on the Quote - therefore the record also does not have IsSyncing set to true.
  • The Quotes of the QLIs that can't be deleted appear to be owned by various users, with different profiles and roles (so it doesn't appear to be related to ownership / sharing rules per se).
  • There were other QLIs loaded with incorrect product2ids in the same batch that could be successfully deleted.
  • Tried setting IsDeleted to true on the record via the Query Editor Developer Console while logged in as a System Administrator, it wouldn't allow the box to be checked at all (let alone saved that way).
  • Tried deleting the records through Dataloader while logged in as a System Administrator, the same error was received that was thrown when trying to delete through the developer console.

I would really appreciate any help with figuring out why these cannot be deleted, and how to go about changing that.

  • The profile that you are deleting the data with, did you make sure that it has Modify all Data permission for the QLI object? Commented Dec 5, 2018 at 12:05
  • is there any delete trigger on QLI ? Commented Dec 5, 2018 at 16:40
  • @KhushbooDua - Modify All Data is checked for Quotes (there isn't an option to set it for QuoteLineItems in Profile Settings). The same is true for Opportunities and OpportunityLineItems, respectively.
    – KB145
    Commented Dec 5, 2018 at 19:54
  • @rahulgawale - No, there aren't any triggers that fire in delete for QLIs (or Quotes).
    – KB145
    Commented Dec 5, 2018 at 19:54
  • I had a similar issue with Order, this might help
    – cropredy
    Commented Dec 7, 2018 at 0:56

1 Answer 1


There is high possibility that the Quote Object do not have delete permission from Profile or any other permission set. QuoteLineItem permissions are managed by Quote but still you will see delete button which will result in this error.

You must log in to answer this question.

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