While working on salesforce customization using Apex, the developers sometimes use improper names to define a class. Moving ahead we might need to change these names or delete the class if it’s no longer in use. Few days before we were working on code re-factorization wherein we had to rename the class according to the functionality and had to delete unwanted classes. While deleting the classes we were getting errors of class references as below.
Looking at the above error message we cannot find the class reference i.e. where is it used? There is a simple way to find references using eclipse. As salesforce provides Force.com ide as a plugin to eclipse we can use many of the standard functionalities provided by eclipse. Follow below steps to find the references in apex.
- Create a Salesforce project using Force.com ide in eclipse.
- Once you have all the desired components (such as Classes, Pages, Triggers, etc.) downloaded in your project, use the search functionality provided by eclipse. To use this functionality either press key “Ctrl + H” or navigate to Search menu >> select “Search” option.
- Enter the class name you want to search and select the scope (mostly “Enclosing project”). Click on “Search” button. For ex. If we want to find all references for class “utility”
- Now you will see the list of all components where the class is referred with navigation to actual line.
- Click on any of listed reference to go to the line and make the desired changes.
Note: Eclipse “Search” works on the text search feature. So you might get navigation to the line even if it’s commented.
Greytrix – a globally recognized Premier Sage Gold Development Partner is a one-stop solution provider for Sage ERP and Sage CRM needs. Being recognized and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development and implementation expertise.
Greytrix caters to a wide range of Sage Enterprise Management (Sage X3) offerings – a Sage Business Cloud Solution. Our unique GUMU™ integrations include Sage Enterprise Management (Sage X3) for Sage CRM, Salesforce.com and Magento eCommerce along with Implementation and Technical Support worldwide for Sage Enterprise Management (Sage X3). Currently we are Sage Enterprise Management Implementation Partner in East Africa, Middles East, Australia, Asia. We also offer best-in-class Sage X3 customization and development services, integrated applications such as POS | WMS | Payment Gateway | Shipping System | Business Intelligence | eCommerce and have developed add-ons such as Catch – Weight and Letter of Credit for Sage Enterprise Management to Sage business partners, end users and Sage PSG worldwide.
Greytrix is a recognized Sage Rockstar ISV Partner for GUMU™ Sage Enterprise Management – Sage CRM integration also listed on Sage Marketplace; GUMU™ integration for Sage Enterprise Management – Salesforce is a 5-star app listed on Salesforce AppExchange.
For more information on Sage X3 Integration and Services, please contact us at firstname.lastname@example.org. We will be glad to assist you.