function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Himanshu Patel 55Himanshu Patel 55 

how to find where is user id hardcoded in code

Hi, 
I am trying to reduce number of API user as our org is very old and so much leagacy code. 

I had found API User Id is hardcoded in some methods.  How can I find all classes where  is this referenced. 
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Himanshu,

In the above scenerio the best solution would be using VS code. Connect to the org and extract all the apex classes into the VS code and search for it .

Please let me know if you need any clarification on it.

If this solution helps, Please mark it as best answer.

Thanks,
 
Suraj Tripathi 47Suraj Tripathi 47
Hii Himanshu Patel,

1.If you're using the developer console then you can use Ctrl+Shift+H that will allow you to search all your Apex in the org. 
2.If you're using VS code then you can use Ctrl+Alt+F that will allow you to search all the ocuurance of a string.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Suraj
Umair Mohammad 10Umair Mohammad 10
How do I use the Developer Console to determine where the Role object is hardcoded?