3
Public class testapi{
   ToolingAPI toolingAPI = new ToolingAPI();
   List<ToolingAPI.CustomObject> customObjects = (List<ToolingAPI.CustomObject>) toolingAPI.query(
   'Select Id, DeveloperName, NamespacePrefix From'+
   'CustomObject Where NamespacePrefix = \'c\''
   ).records;
}

I am not able to save this code it is coming :

Invalid type: ToolingAPI

kindly help me to resolve the issue

  • 1
    I am not able to see ToolingAPI object definition anywhere in Salesforce developer documentation. Is it coming from some other Managed package which you missed to install ? or Please point me to the documenation you are referring – karthikselva Feb 25 '16 at 7:57
  • I am referring some blogs and try to create it.andyinthecloud.com/category/tooling-api – Vidhyasagaran Muralidharan Feb 25 '16 at 8:00
  • whether i need to use rest callout to implement this code or we can directly in the apex – Vidhyasagaran Muralidharan Feb 25 '16 at 8:02
3

Short Answer: https://githubsfdeploy.herokuapp.com/?owner=afawcett&repo=apex-toolingapi

Long Answer:

You are missing the required Package https://github.com/afawcett/apex-toolingapi. This is the package which contains the ToolingAPI class.

Ref:

https://github.com/afawcett/apex-toolingapi

Update:

I tried all the steps above in my org and finally tried your snippet and it works fine.

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.