Skip to main content
Solved

How to delete a canceled Service Contract


Forum|alt.badge.img

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

 

 

 

Best answer by Laura02

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.

View original
Did this topic help you find an answer to your question?

2 replies

Laura02
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3132 replies
  • Answer
  • June 30, 2022

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.


Forum|alt.badge.img
  • Author
  • Freshman II
  • 11 replies
  • June 30, 2022

Laura,

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

Thank you!
-Ken


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings