Skip to main content
Will Jenkins a posé une question dans #Salesforce CPQ & Billing
Our automated tests delete records that they have created behind themselves to tidy things up. This works well with orders, quotes and accounts, so long as we delete things in the correct order (for example, removing order lines before the order itself, or deleting quotes from an account before deleting the account).

 

However, we have moved onto creating invoices, and are not able to follow the same pattern with these objects. We are using Salesforce Billing to generate the invoice, and connecting as an administrator, but get the following message when we attempt to delete an invoice line:

 

InvoiceLine cannot be deleted

 

When we try and delete an invoice line via the UI we get the same error message.

 

The profile used is the standard System Administrator one, which appears to have all the CRUD access on both the Invoice and the InvoiceLine objects. Does anyone know what is stopping us complete this action?
4 réponses
  1. 19 janv. 2018, 19:23
    Hi Will,

     

    The Billing package triggers have validations to prevent deleting invoice lines and invoices.  There is a package setting called Disable triggers that can do just that for your tests. If it's possible to get to and change via code, it's here:  Custom Settings > Billing Config > DISABLE_TRIGGERS.

     

    -Frank
0/9000