Questions tagged [tooling-api]

Tooling API exposes objects used in developer tooling that you can access through REST or SOAP, and works just like the Salesforce REST API and SOAP API.

Filter by
Sorted by
Tagged with
14 votes
1 answer
12k views

Tooling API usage in salesforce Apex method

I am trying all my level best to know how the Tooling API is used. Can someone suggest or show me with a small example on how do I create a apexClass in a controller method. I have already generated ...
Soberano's user avatar
  • 1,232
19 votes
2 answers
9k views

How do I use the Tooling API to create a new Apex Trigger?

How do I use the Tooling API to create a new Apex Trigger (rather than update an existing one)? According to the documentation I need to specify the ContentEntityId as an existing Trigger Id. But in ...
Daniel Ballinger's user avatar
14 votes
2 answers
4k views

Lightning: is direct API access on the roadmap?

I'm programming developer tools and an IDE. Right now, my code is based on Visualforce and JavaScript. As described here, I would like to convert most of my API callouts form APEX to JavaScript. Also ...
Uwe Heim's user avatar
  • 28.3k
7 votes
2 answers
7k views

Create/Update Global Value Set using Tooling API

Can someone tell me how to create and update Global value set using tooling API? No sure what so send in request body.
Arteezy's user avatar
  • 135
5 votes
1 answer
3k views

Symbol Table from Apex Class

In an earlier question Here I asked in general about the symbol table for an Apex class. Using the Tooling API wrapper from Here I am able to get part way there. But am unGodly confused. If I go to ...
ScottH7a9's user avatar
  • 575
2 votes
3 answers
2k views

Is it possible to use the Tooling API to update field level security on Profiles and PermissionSets?

I'm trying to use the Tooling REST API to create a new CustomField and then add it to certain Profile and PermissionSet metadata with read/edit access appropriate to those profiles / permissionsets. ...
bds914's user avatar
  • 33
6 votes
1 answer
2k views

Trying to get SymbolTable of an Apex class and get null

I'm quering Apex classes using Tooling API QueryResult queryResult = toolingConnection.query("select Id, ApiVersion, Name, NamespacePrefix, SymbolTable, Body from ApexClass where NamespacePrefix = ...
Liudmila Likhovid's user avatar
14 votes
1 answer
4k views

How to limit API calls when using the Developer Console?

In a Winter '14 Developer Edition and Spring '14 Pre-release I have noticed that using the Developer Console uses API calls. It looks like this affects third party tools like MavensMate as well. The ...
Peter Knolle's user avatar
8 votes
1 answer
665 views

Tooling API - ProfileMetadata not being returned v32

I am attempting to use the Tooling API to retrieve all the data for a particular profile. According to the Tooling API documentation from v32 there is a Profile object which contains a set of ...
pbattisson's user avatar
  • 3,298
5 votes
2 answers
4k views

How to get Custom Object Metadata CreatedBy

I need to get list of Custom Objects in a Salesforce org and find Created By User of each of them (Created By of object, not the records) . Is it possible? I can get string list of custom objects as ...
ChamingaD's user avatar
  • 313
3 votes
2 answers
2k views

Possible to create a new sObject with Tooling API REST interface?

By my reading of the docs, it should be possible to create a new SObject by POSTing to /tooling/SObjects/EntityDefinition, but I haven't made it work. Here's an example (the result of some trial-and-...
Jason Clark's user avatar
  • 11.8k
1 vote
2 answers
3k views

Querying all the SandboxInfo via REST API

Our architecture uses Salesforce to send some emails to clients automatically, so to reproduce the full architecture in a demo environment we need to have an identical instance of Salesforce. We can ...
Edmondo's user avatar
  • 1,702
15 votes
1 answer
9k views

How do I update Custom Label's value using apex? Which one would be a better option metadata api or tooling api? Please provide example

I'am working on post deployment automation process in salesforce. I am stuck on how should I update values in custom labels which needs tobe updated manually after a sandbox refresh.
AJINKYA RAUT's user avatar
12 votes
2 answers
8k views

Dynamically set remote site Setting in Apex

I have created a managed package that uses tooling API for updating class, trigger etc. Everything runs fine with all sorts of testing. I have created this package in my Developer org. I had to set ...
Soberano's user avatar
  • 1,232
11 votes
1 answer
4k views

Issues with managed package visibility?

Question Is anyone experiencing issues with incorrect managed package apex class visibility? Suddenly unable to save a class and everything seems to be in order. What am I missing? Anyone run into ...
Ralph Callaway's user avatar
11 votes
3 answers
402 views

Metadata+ToolingAPI access on CS14 (and other pods) extremly slow & No Support?

We are working on CS14. Starting last Friday we are suffering form a extreme performance loss on CS14. Loading and Saving Metadata via Tooling/Metadata-API is very slow. Operations which usually ...
Uwe Heim's user avatar
  • 28.3k
9 votes
4 answers
8k views

Are profile and permission set metadata files getting all project objectPermissions?

I have a project in development. There about 45 new SObjects to the org but there is also a couple of new profiles for the org. The permissions on several existing SObjects have been specifically ...
ImJohnMDaniel's user avatar
6 votes
1 answer
3k views

Anyone else having issues with deployment to sandbox stuck in pending for 5-60 minutes

Developing in two sandboxes and both of them when I attempt to deploy anything via metadata or tooling API the deployment is stuck in a pending status from 5-60+ minutes. I have a case open for one ...
Eric's user avatar
  • 54k
5 votes
1 answer
1k views

Which Tooling API Objects can be queried in Apex?

I would like to know which objects I can query in Apex which are not listed in the SOAP API Developer Guide but are listed in the Tooling API Developer Guide. Is there a list maintained somewhere?
Adrian Larson's user avatar
  • 149k
4 votes
1 answer
3k views

How to find Dependent Components for a Class/Page/Trigger using API (Tooling or Metadata API)?

We are trying to automate certail processes for which we need to find the dependent components for a Class/Page/Trigger. We understand that salesforce is providing dependent components using "Show ...
Bugude's user avatar
  • 390
4 votes
2 answers
538 views

Symbol table for Lightning components to find Dependencies/References

Like we do have SymbolTable for apex class, to find their references/dependencies; do we have anything for the Lightning Components(to find dependencies/references of lightning components/application/...
Ysr Shk's user avatar
  • 3,104
4 votes
1 answer
3k views

Creating Visualforce Page Using Tooling API

i was trying create a visualforce page from Developer Console using Tooling API ( REST Service ). I checked the documentation it doesn't clarify about the parameters which needs to be present. ...
ForceDeveloper's user avatar
4 votes
1 answer
759 views

Rest calls for Tooling API object with composite do not work

I'm trying to create multiple ApexClassMember records via REST Tooling API calls. In official documentation they claim, that You can Create Multiple Records with Fewer Round-Trips However, in ...
Bartłomiej Góral's user avatar
4 votes
1 answer
2k views

Tooling API calls from Apex requires user to set up Remote Site Settings?

For a personal project, I'm trying to retrieve Validation Rules from objects to display them inside a Visualforce page. For this I'm using the excellent Tooling API wrapper from Andrew Fawcett, but ...
FuuRe's user avatar
  • 479
4 votes
1 answer
953 views

Tooling API in production org

I am already aware that you cannot directly create Apex classes in production orgs (have to use either the Force.com IDE or changesets). But if I include test cases can the Tooling API do it? Also ...
Mossi's user avatar
  • 3,906
3 votes
1 answer
712 views

How can I know via API how many fields are allowed to create in custom object

I am trying to create sql table structure in salesforce as an object. In salesforce, there is a field limitation that allows only creation of 100 fields (I am using PE). My SQL table contains more ...
Kevin's user avatar
  • 43
3 votes
2 answers
266 views

Why PersonAccount is showed in custom object in Tooling API query?

I queried the below in the service console to get the custom object count. But I got one object difference. i.e "PersonAccount" . When i check the ID its not displaying in the UI page. select id, ...
bharath's user avatar
  • 1,704
2 votes
2 answers
279 views

Patching ToolingAPI.cls for v31+: How to query for DeployDetails at ContainerAsyncRequest?

My original problem is described here: ToolingAPI.cls for Apex: How to get CompilerErrors at ContainerAsyncRequest in v31+? Now I have patched ToolingAPI.cls like this: // elf-patch public class ...
Uwe Heim's user avatar
  • 28.3k
2 votes
2 answers
2k views

Finding sharing settings OWD

I'm trying to find the sharing settings OWD information and I have looked at the tooling/api and APEX/SOQL could not find, is that even possible to retrieve this metadata information?
Nick's user avatar
  • 6,934
1 vote
2 answers
5k views

How to get ID of a custom field in apex [duplicate]

I have a requirement to get the ID of a custom field in apex . When we navigate to Setup-->Create-->Object--> Click on Object --> Click on field .In field detail page url we can find field Id https:/...
wAitIng dOg's user avatar
1 vote
1 answer
731 views

How to execute a code inside an executeAnonymous block of toolingAPI in salesforce?

Below is a piece of code I am trying to run. global class TriggerClass { @future (callout=true) public static void ifMethod(String sessionId, String ifcondition) { ToolingAPI....
Jyoti Zanwar's user avatar
1 vote
2 answers
912 views

Dynamically creating a trigger

I'm looking to add functionality to my managed package that would dynamically create a trigger based on user inputs. I've seen some conflicting answers about whether a trigger can be created using the ...
emroc's user avatar
  • 481
0 votes
2 answers
121 views

How to bulk remove components from an unlocked package?

As part of this effort Preserving org data when converting orgs from an unlocked package to a managed package version of the same code? I'm looking for a way to remove hundreds of items from an ...
Keith C's user avatar
  • 135k
0 votes
1 answer
83 views

salesforce "customobject" tooling api returns more records than what seeing in the system overview

The "CustomObject" tooling API returns more records than what i am seeing in the System Overview UI. Can someone please explain the reason for it, thanks. API response: System Overview:
Kumar Vivek's user avatar
0 votes
1 answer
188 views

Calling ToolingAPI to save an AuraDefinition using PATCH via JavaScript possible?

I'm trying to save an AuraDefinition from within a native Visualforce app. Therefore I following @MartyC. suggestion here: Lightning ToolingAPI BETA Documentation As an unfortunate PATCH requests ...
Uwe Heim's user avatar
  • 28.3k
21 votes
1 answer
3k views

Save/Deploy multiple files at once with MavensMate in Sublime Text 3

When editing multiple Apex classes using MavensMate in Sublime Text is it possible to save them all back to Salesforce in one MetadataContainer? I've got an abstract base class and a controller that ...
Daniel Ballinger's user avatar
13 votes
2 answers
421 views

Salesforce Packaging Bug with Lightning Components? (Warning: very strange!)

Since years I'm using Metadata and Tooling Apex classes to connect with those APIs (based on Andrew Fawcetts work here https://github.com/afawcett/apex-toolingapi). Today I'm encountering a very ...
Uwe Heim's user avatar
  • 28.3k
11 votes
2 answers
2k views

Is it possible to update custom field metadata via the tooling api?

I can successfully make a patch request to the tooling api to update a custom fields api name. However, if I include any of the field properties in the CustomFieldMetadata object I get an internal ...
Greg Grinberg's user avatar
11 votes
2 answers
2k views

Tooling API in Apex - polymorphism, generic query() callout?

I am working on Salesforce project heavily depending on use of Tooling API (we are executing tests on remote SF organizations and gathering results). What bothers me is I cannot use polymporphism ...
Wookie88's user avatar
  • 713
9 votes
1 answer
8k views

How can I activate a Lightning Page via metadata?

I am deploying a solution which includes Lightning Pages and I would like to programmatically activate the FlexiPage in the target org when it is deployed. In the Configure Lightning Experience ...
Mark Pond's user avatar
  • 22.9k
7 votes
1 answer
5k views

find out dependent fields, object and classes in salesforce

I want to know class is dependent to which class, object, and Field. I have tried to retrieve data from SymbolTable but it doesn't show me dependent Class Name or ID. Is there any another way to ...
Mehul's user avatar
  • 71
7 votes
1 answer
514 views

When is the Force.com IDE going to be rewritten (using the tooling api)

Last year I attended the Dreamforce session: Next Generation Debugging with the Developer Console and Tooling API One of the most exciting things that was mentioned was that the Force.com IDE is ...
Daniel Blackhall's user avatar
7 votes
1 answer
2k views

Is there a Javascript Wrapper Salesforce Metadata API?

I'm using Andrew Fawcett's legendary Apex Wrapper Salesforce Metadata API in several projects. It perfectly works and provides a new dimension of APEX programming. Now there are situations where it ...
Uwe Heim's user avatar
  • 28.3k
6 votes
2 answers
6k views

What is the URL for using the Tooling API via SOAP?

What is the URL for using the Tooling API via SOAP? If I already have a valid Session Id I can start using the API directly: E.g. Enterprise API: https://server-api.salesforce.com/services/Soap/c/27....
Daniel Ballinger's user avatar
6 votes
3 answers
461 views

How to get the DE-Orgs Namespaceprefix? (NOT the Namespaceprefix from the scope of an object or class)

The are a lot of solutions to get the namespace of an specific object or class, e.g. ApexClass myClass = [ select NamespacePrefix from ApexClass where Name = 'SomeClassNameHere' ]; But ...
Uwe Heim's user avatar
  • 28.3k
6 votes
1 answer
421 views

Standard field accessiblity inconsistent : feature or simply strange?

UPDATE: Thanks to @ca_peterson I could clarify the issue below and it all drills down to FLS. But even having identified FLS as the reason, the behavior is still odd and I have addressed it in this ...
Uwe Heim's user avatar
  • 28.3k
5 votes
2 answers
2k views

Describe call to sobjects with Tooling API fails

I am trying to make a describe call to CustomObject however I get no response back. The URL for the call is: Note : I am describing entity "CustomObject" (Similar to CustomTabs) - it is not a ...
Kiba's user avatar
  • 213
5 votes
2 answers
4k views

Tooling API execute anonymous results

I am trying to run an execute anonymous statement using tooling API. I am running a very simple System.debug('test'); Now the issue is as this is a GET request, the response that I get is like this ...
SEuser's user avatar
  • 1,835
4 votes
2 answers
979 views

Getting null Metadata values from Tooling API

I want to view the Metadata(RecordType, VF access, Apex class access,etc.) from Profile using Tooling API. My code looks similar to this ToolingAPI toolingAPI = new ToolingAPI(); List<...
Daniel's user avatar
  • 41
4 votes
3 answers
1k views

Lightning access via ToolingAPI or MetadataAPI

I assume there is no official support in the APIs right now since Aura Components are in BETA. The choice of developer tools is a bit narrow (Developer Console and Sublime Lightning) and I want to add ...
Uwe Heim's user avatar
  • 28.3k