Solved

How to delete a canceled Service Contract


Userlevel 2
Badge

I have a request from a client to delete all “Canceled” Service Contracts

I tried adding a delete button to the Service Contracts GI.
This resulted with: Error: The record cannot be deleted.

 

Different approach: I tested using a SQL DELETE in my local Acumatica instance database.to bulk delete all existing Service Contracts that have a status of “Canceled”

                  DELETE FROM [FSServiceContract] WHERE Status = 'X'

This appears to have deleted all the Service Contracts that have a Status of “Canceled”, which is what the customer wants. 
Note: This SQL approach does bypass business rules in this module.
 

Question: Is there a better (preferred) approach to deleting Service Contracts that have a Status of “Canceled”?

My customer requests:

  1. Bulk delete all of the Service Contracts that have a status of “Canceled”.
  2. Give them the ability to delete Service Contracts that have a status of “Canceled” on their own.

Thank you in advance.

Ken Severud

 

 

 

icon

Best answer by Laura02 30 June 2022, 15:12

View original

2 replies

Badge +16

Hello,

I can’t recommend using SQL to delete out of tables in the database.  (Using SQL to delete is never the Better/Preferred approach.)

I wonder whether you’ve considered using Filters to ‘hide’ or at least move the canceled contracts out of the way of the users?

Add filter in Service Contracts based on status.  Make a tab that includes where status <> canceled the default tab.

Inside the screen, where you click magnifying glass to see contract lookup list, make the same filter: create a tab that does not include canceled contracts and make the new tab the default for all people.

Good luck.

Userlevel 2
Badge

Laura,

I appreciate your suggestion. I’ll give it a try.

Thank you!
-Ken

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved