> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a sale

> How to update a sale with CRMScript in SuperOffice.

```crmscript theme={null}
NSSaleAgent saleAgent;
NSSaleEntity sale = saleAgent.GetSaleEntity(4);

NSListAgent listAgent;
sale.SetCompetitor(listAgent.GetCompetitor(1));

sale = saleAgent.SaveSaleEntity(sale);
```

## Delete a sale

It might be necessary to delete a sale if it is no longer appropriate to store it in the database.

```crmscript theme={null}
NSSaleAgent saleAgent;
Void DeleteSaleEntity(123);
```


## Related topics

- [Update a sale](/en/sale/learn/update.md)
- [Update sale](/en/mobile/sale/update.md)
- [Sales](/en/mobile/sale/index.md)
- [Update Sale Stakeholders](/en/api/reference/restful/agent/sale_agent/update-sale-stakeholders.md)
- [Sale table](/en/api/bulk-operations/bulk-update/reference/sale-table.md)
- [Update a SuperOffice CRM Sale action](/integrations/zapier/howto/actions/update-sale.md)
