I have one .Net web service which is used by my Salesforce application. I have used different Salesforce APIs to interact with Salesforce. Now, I have created one REST Service in my Salesforce application and before using it in .Net web service, I want to check whether this REST service exists or not. How can I do that? Do we have any metadata method to check existence of Apex Class/Rest Service?


You can querry the ApexClass using the RestEndpoint and provide your class name in where clause. If it returns record you can say that class exists. You can also query the class code in the body parameter.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.