Remove Groups from Sage CRM DB using SQL Queries

By | August 31, 2020

Sage CRM can be customized many ways, but some time user wants to undo the changes which have been done before. Suppose some time it happed that user has created number of Group which he may need to remove if there is no longer in use. So user can also delete this Group that have been created. In this Blog we are going to see How to delete a Group from DB and from Sage CRM. For this follow below steps.

New Stuff: https://www.greytrix.com/blogs/sagecrm/2020/07/08/integrate-sage-crm-with-microsoft-office-365-part-1/

Recently from one of our client we came across a question wherein user wants to remove some Groups from DB and from Sage CRM, inorder to achieve this there are some query that needs to be execute in SQL. Continue reading below to see how this can be achieve.

Suppose you want to delete below group from Sage CRM

Group List
Group List

Start SQL Management Studio and execute below query to find Repo_ReportID

select * from Custom_Reports where Repo_Name = ‘All Customers – Sage CRM

Group ReportID
Group ReportID

Next update the Repo_Reportid in the below update query and execute the queries this will delete that particular Group from Sage CRM. Kindly note that, this will soft delete Group record from Sage CRM.

  • update Custom_ReportFields    set refi_deleted = 1 WHERE ReFi_ReportBandID = (SELECT ReBa_ReportBandID FROM Custom_ReportBands WHERE ReBa_ReportID = 182)
  • update Custom_ReportBands    set reba_deleted =1      WHERE ReBa_ReportID = 182
  • update Custom_ReportSearches set rese_deleted = 1 WHERE ReSe_ReportID = 182
  • update Custom_Reports   set repo_deleted =1 WHERE Repo_ReportID = 182
  • update Custom_Captions  set capt_deleted = 1 WHERE Capt_family = ‘GroupsName’ and capt_code = ‘All Customers – Sage CRM’ update Custom_Captions  set capt_deleted = 1 WHERE Capt_family = ‘GroupsDescription’ and capt_code = ‘All Customers – Sage CRM’

If you want to hard delete Group record then you need to execute below DELETE queries.

  • DELETE FROM Custom_ReportFields WHERE ReFi_ReportBandID = (SELECT ReBa_ReportBandID FROM Custom_ReportBands WHERE ReBa_ReportID = 182)
  • DELETE FROM Custom_ReportBands WHERE ReBa_ReportID = 182
  • DELETE FROM Custom_ReportSearches WHERE ReSe_ReportID = 182
  • DELETE FROM Custom_Reports WHERE Repo_ReportID = 182
  • DELETE FROM Custom_Captions WHERE Capt_family = ‘GroupsName’ and capt_code = ‘All Customers – Sage CRM’
  • DELETE FROM Custom_Captions WHERE Capt_family = ‘GroupsDescription’ and capt_code = ‘All Customers – Sage CRM’

In this way we can delete Groups from Sage CRM Database.

Hope this is fine!

About Us

Greytrix – a globally recognized and one of the oldest Sage Development Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation competence.

Greytrix has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3Sage IntacctSage 100Sage 500 and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users and Sage PSG worldwide. Greytrix helps in migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes addons like  Greytrix Business ManagerSage CRM Project ManagerSage CRM Resource PlannerSage CRM Contract ManagerSage CRM Event ManagerSage CRM Budget PlannerGmail IntegrationSage CRM Mobile Service Signature and Sage CRM CTI Framework.

Greytrix is a recognized Sage Champion Partner for GUMU™ Sage X3 – Sage CRM integration listed on Sage Marketplace and Sage CRM – Sage Intacct integration listed on Sage Intacct Marketplace. The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

For more information on our integration solutions, please contact us at sage@greytrix.com. We will be glad to assist you.