+ Start a Discussion
Himanshu Patel 55Himanshu Patel 55 

how to find where is user id hardcoded in code

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.

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,