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
2
votes
1answer
525 views

Creating Apex Class in SOAP Tooling API Using MetadataContainer

It's fairly easy to create an ApexClass in the SOAP Tooling API: ConnectorConfig partnerConfig = new ConnectorConfig(); partnerConfig.setManualLogin(true); PartnerConnection partnerConnection = com....
9
votes
1answer
161 views

Winter 16 issue? Tooling API queries not working from Triggers, Visualforce

This looks like a Winter 16 issue, but would appreciate any other thoughts. Queries of tooling api objects (such a FieldDefinition) return no results when run in a trigger or a VF page, but they do ...
2
votes
1answer
180 views

Do SOQL queries of Tooling API objects count against governor limits?

The "system catalog" objects of the Tooling API (EntityDefinition, FieldDefinition, etc) provide a lightweight alternative to describe() calls, for example: // get a list of fields for an sObject ...
1
vote
2answers
3k 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:/...
2
votes
1answer
660 views

Is there a way to query sandbox configuration info? (e.g. Location, sandbox name, etc)

I would like to be able to query the Sandbox configuration data. For example, if you go to the "Sandboxes" link in the setup of your production org, I want to be able to query that info (Name, Type, ...
3
votes
1answer
354 views

SandboxInfo tooling api

Hi I was wondering if anyone has started to use the new winter 16 and the API to refresh sandboxes. In the winter 16 tooling API, it says there is a new object called SandboxInfo, but if i use ...
2
votes
2answers
290 views

Cannot get apex code coverage from my Java app via SOAP Tooling API

Running code like the following throws exception: query = "SELECT Coverage FROM ApexCodeCoverageAggregate WHERE ApexClassOrTriggerId ='" + id + "'"; QueryResult q = project.getToolingConnection()....
3
votes
2answers
695 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-...
-1
votes
1answer
78 views

How to create triggers and classes by php into salesforce

Can We create triggers and classes by php into salesforce. Can anyone please provide the appropriate guideline for this.Any code base guidance would really helpful?
3
votes
1answer
139 views

Tooling API: ScopeId on TraceFlag doesn't work as expected/documented

If I create a TraceFlag with ScopeId = null and TracedEntityId = id of my trigger on contact Object {contactTrigger}--> ApexLogs are not generated each time a contact is created or updated. Note: I ...
0
votes
2answers
150 views

Help needed on Metadata API or Tooling API

Has anyone used Metadata API or Tooling API to bulk update Workflow, Validation Rule etc? I am trying to play with these 2 API using SOAP UI but not sure if that's feasible. Any guidance will be ...
4
votes
2answers
944 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 ...
1
vote
1answer
124 views

Tooling API - unable to figure out how create method is invoked

I am trying to understand tooling API - SOAP and was trying to create a simple Java class which uses tooling wsdl file to create Apex class. I borrowed the snippet from https://developer.salesforce....
2
votes
1answer
436 views

Tooling API query unknown exception

While these queries work: select Name from StandardAction where EntityDefinition.QualifiedApiName = 'Account' select Name from StandardAction where EntityDefinition.QualifiedApiName = 'Asset' these ...
1
vote
2answers
185 views

Running test via Ant does not seem to store coverage

I've been banging my head on this issue for a while now and I'm throwing my hands up and asking for help. When I run all tests in my org (either via the Run All Tests button or running them all in ...
2
votes
1answer
163 views

Difference between ApexTrigger and ApexTriggerMember

I am trying to understand how to manipulate triggers via the Rest API (turn them on and off). What is the difference between the "ApexTrigger" and "ApexTriggerMember" object? Does any one have any ...
0
votes
1answer
282 views

How do I find when a Custom Label was created or modified from API

How do I find when a Custom Label was created, modified, or who Created or Modified it from an API ? I have checked Partner WSDL, Metadata API and Tooling API but none of them give out this ...
2
votes
1answer
179 views

How to get formula field compile size from api

Is there a way to get the compile size of a formula field through the metadata api or the tooling api? I have found "calculatedFormula" on the metadata api and "formula" on the tooling api but ...
3
votes
2answers
2k 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 ...
-2
votes
1answer
640 views

Tooling API giving error of resource not found

I am trying to do a simple code with Tooling API, where I am trying to execute anonymous one statement with tooling API. Sample request - HttpRequest req = new HttpRequest(); req....
0
votes
1answer
353 views

Delete fieldset using Tooling/Metadata API (JSforce)

Tried this using the following 2 snippets; both failed. Snippet 1 conn.tooling.sobject('FieldSet') .delete({ DeveloperName: fieldsetName }, function(err, meta) { if (err) console....
0
votes
1answer
177 views

Using the Tooling API to query a workflowalert with a fullname more than 80 characters fails with UNKNOWN_EXCEPTION

Summary Using the Tooling API to query a workflowalert with a fullname more than 80 characters will result in an error similar to the following: ERROR:- UNKNOWN_EXCEPTION: An unexpected error ...
7
votes
3answers
309 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 ...
2
votes
0answers
137 views

Creating workflow through APEX tooling API

There is a very good article with working code available on below link, which shows how to create triggers dynamically from apex classes by using tooling API: http://www.sundoginteractive.com/sunblog/...
3
votes
2answers
846 views

Tooling API error: Object type not accessible (JSforce)

I have this very simple script on the JSforce script executor: var apexBody = "<apex:page standardController='Account'>Test</apex:page>"; conn.tooling.sobject('ApexPage').create({ ...
1
vote
2answers
1k views

Salesforce Tooling API for ValidationRule

I am trying to update ValidationRules via the tooling API via PATCH and the endpoint: /services/data/v33.0/tooling/sobjects/ValidationRule/{Id} Every time I try to update a field i get this error and ...
3
votes
1answer
132 views

Getting Salesforce Object Id

Is it possible to use the Salesforce API to get an object's internal salesforce id. For example this id appears in the URL for a custom object setup: https://cs15.salesforce.com/ID?setupid=...
0
votes
1answer
83 views

User Fields on Tooling API

I'm trying to do a query using the Tooling API (using JavaScript) as follows: var query = 'SELECT+Id,+Name+FROM+User+WHERE+Name+LIKE+\'%25' + name + '%25\''; ftClient.query(query, function(success) { ...
1
vote
1answer
443 views

Tooling API - query Attachment

I'm using Salesforce Tooling API in my C# application. When I'm trying to run the query: var res = sforce.query("select id from Attachment where parentid = '" + id + "'"); I get the following error: ...
1
vote
3answers
1k views

What is the best tool for using metadata API in python?

We use Salesforce REST and Bulk APIs extensively and now we have reached a point where we have to use the metadata API. Our use case is pretty trivial. We only have to create a custom object using ...
1
vote
1answer
1k views

Cannot Access RecordType.DeveloperName Field as System Admin

I'm a System Admin in an org and today our Flow was throwing errors saying no such field RecordType.DeveloperName. I tried running a SOQL query using that field in Developer Console and I get same ...
2
votes
1answer
3k views

Error converting HttpResponse to Dom.Document

I am calling the Tooling API from Apex in order to find out if a Custom Field has been created. Here is my code: HttpRequest req = new HttpRequest(); req.setHeader('Authorization', '...
3
votes
2answers
602 views

Override View with URL

Is it possible, via the API or otherwise, to override the View button of an object with a URL (instead of a VF page)?
0
votes
1answer
314 views

Tooling API error: Object type not accessible

I have the following as my request for creating a new VF page via Tooling API: {"Name" : "TestPage", "MasterLabel" : "TestPage", "Markup" : "< apex:page standardController='Car__c'>< /apex:...
2
votes
1answer
210 views

TraceFlag Tooling REST API

How to send a TaceFlag using the Tooling REST Api?I am looking for a good REST example how to setup Traceflag and get how to get Traceflag results back?
3
votes
0answers
386 views

ValidationRule queried via REST API returns Deleted objects VR too and that results in error with GACK?

UPDATE [15 Jul'15] : Salesforce support confirmed that this is indeed a bug and their Research & Development team is working on this case and the matter is under our observation. Here is the ...
0
votes
1answer
439 views

How to Update Static resource using Tooling api in salesforce?

Httprequest req =new HttpRequest(); req.setEndpoint(URL.getSalesforceBaseUrl().toExternalForm()+'/services/data/v28.0/tooling/sobjects/staticresource/08190000000cgISAAY/'+'?_HttpMethod=PATCH'); req....
12
votes
3answers
379 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 ...
0
votes
1answer
1k views

How to query Id of a field/Custom field from standard object using Tooling API in .net

How do I get the Id of the field on Standard object like Account, Opportunity & Custom Object and Custom Field Id using Tooling API in .net.
2
votes
0answers
322 views

Deploying a Profile Update via Tooling RESP API - INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY

I was wondering if anyway has ever been able to make updates to Profiles via the Tooling REST API? I have recently built an application which creates CustomFields via the API, and I would then like ...
14
votes
2answers
3k 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 ...
8
votes
1answer
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 ...
6
votes
1answer
307 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 ...
5
votes
1answer
566 views

Hitting governor limit while retrieving custom labels

In the current functionality, we retrieve custom labels from the source organization. The labels are retrieved from salesforce into another Salesforce organization. However, when retrieving the labels ...
3
votes
1answer
64 views

Can I find the field that will be updated from a WorkflowRule

So I have two workflow rules that fire when an Opportunity is created/updated. These two workflows set the same variable to either true/false depending on which criteria is met. I'm looking at ...
1
vote
1answer
306 views

How to support inheritance with WSDL2Apex

I'm attempting to update the tooling api project (https://github.com/afawcett/apex-toolingapi) with a SOAP variant in addition to the REST api. The issue I'm currently having is supporting all the ...
5
votes
2answers
2k 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 ...
3
votes
0answers
435 views

tooling API workflow alert update

i am trying to update workflow alert email template using tooling api. REST AND PATCH . JSON body is below {"Metadata":{"ccEmails":["test@gmail.com"], "description":"...
3
votes
1answer
2k 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 ...
0
votes
1answer
811 views

Size of an attachment?

Is there any api in salesforce to find out the size of an attachment? I am creating package.XML in Salesforce and I would like to make sure that the size is less than 3 MB.