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.

56 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
14
votes
0answers
320 views

Using the Tooling API to create trigger, getting Error No such column 'Email' on entity 'User'

I'm using the Tooling API to dynamically create an Apex Trigger. The trigger itself consists of one line, calling a method in a Util class. Creating this trigger by hand works fine. When I try to ...
7
votes
1answer
99 views

Is there a supported way to get what attributes a lightning component has programmatically?

Is there a supported way to get what attributes a lightning component has programmatically, given its name, that could identify (global) attributes on components from managed packages as well? The ...
6
votes
0answers
92 views

Delete a Managed Object using Tooling or Metadata API when Deletable

Trying to delete a validation rule in subscriber org using either the tooling or metadata API This validation rule WAS part of a managed package but was deleted from the package and new version ...
5
votes
0answers
130 views

Way to get the sandbox host from ToolingAPI

Looking at the new-ish SandboxInfo and SandboxProcess objects I don't see anyway to get the pod name (ie, NA7, CS16, etc). Is there a way to get this information from the ToolingAPI, or do I have to ...
4
votes
0answers
41 views

Tooling API Doesn't return Set/List/Map types

I'm trying to use to tooling API to retrieve information about methods within a class. While I do get the data, I noticed that the arguments for methods are incomplete. Any method that uses a ...
4
votes
0answers
324 views

How to Login to Salesforce via Tooling/Partner SOAP API with char[] instead of String?

I am working on a tool that makes use of the Tooling API and the Partner API. The Partner API is used to login as I have been unable to login successfully via the Tooling API. Another important thing ...
3
votes
0answers
130 views

Ajax REST Tooling Queries Return Null SymbolTable?

Background I'm trying to build upon Daniel Peter's approach in his HyperBatch library to build a HyperQuery tool that will allow me to get better insight into some large tables we have without ...
3
votes
0answers
385 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 ...
3
votes
0answers
433 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
0answers
313 views

Apex Standard Library Symbol Table

The ability to query a symbol table for a custom apex class is great, but can we obtain this information for standard classes? I have tried things like... SELECT SymbolTable FROM ApexClass WHERE ...
3
votes
0answers
473 views

How to exclude deleted fields from Apex Tooling API query

I have an object with a couple of deleted (and erased) fields. When I try and run a query like this using the Apex Tooling API (List<ToolingAPI.CustomField>)toolingAPI.query('Select Id, ...
3
votes
0answers
92 views

Debug logs of my code in ExecuteAnonymous method of tooling API are not available

I am trying to get the debug logs of my code that I use in the ExecuteAnonymous method of the tooling API. But I am getting a null value. I have added my code below. toolingSoapSforceCom....
3
votes
0answers
73 views

Can you build a symbol table from a VF page?

Is there a parser for a VF page that will build a symbol table? I'd like to know what external references exist so I can tell what public variables and methods are unused in a project. Looks like ...
3
votes
0answers
159 views

Tooling API Bug? or my bad? INVALID_FIELD_FOR_INSERT_UPDATE No access to entity 'anyobject__c'

Anyone seen this error before with the tooling api? All references to custom objects generate errors from references to custom objects. Only seems to apply to create calls, if I create it as an empty ...
2
votes
0answers
148 views

Getting FullName from Tooling API gives FIELD_INTEGRITY_EXCEPTION

I need to get the API names of all layouts in my salesforce org.I have used composite metadata api to perform queries in batch of 5 and then get the FullName.It works fine but i get a field integrity ...
2
votes
0answers
34 views

Bug: blank locationsNotCovered returned from REST: /tooling/runTestsSynchronous/

Starting a few days ago SFDC sandboxes upgraded to Winter 19 started to return blank locationsNotCovered node in /tooling/runTestsSynchronous/ result For example - a basic call with 1 test class like ...
2
votes
2answers
1k views

Create/Update Global picklist using tooling API or MetaData API

Need to create or update the values of the global picklist using tooling API or Meta-data API.
2
votes
0answers
218 views

Bug? FieldDefinition is Createable via Tooling API

I found this question very interesting: Programmatically Determine Which Objects Allow Lookup References to Them? In my naiveté, I thought perhaps this question could be answered by using the Tooling ...
2
votes
0answers
31 views

Use MetadatacontainerID in Visualforce Page

I have written a code for creation of MetadataContainer in Tooling API in my Apex class. public Static void createNewMetadataContainer() { ToolingApi tooling = new ToolingApi(); string ...
2
votes
0answers
135 views

Why in all ApexClassMember I have MetadataContainerId = null

In my previous question I want to get method references from ApexClassMember --> SymbolTable. Following Daniel algorithm from his answer: General steps to get the SymbolTable: Create a ...
2
votes
1answer
86 views

Cannot catch the result of ExecuteAnonymous in toolingAPI

I have a future method called out from a trigger which passes the ifcondition to be evaluated to this method and if this evaluates to true I need to call some classes. The problem here is even if the ...
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/...
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 ...
2
votes
0answers
153 views

write tooling api classes to file

I am trying to write ApexClass (soap tooling API) to a file, I want to load it later on the ApexClass. I don’t know how to use the write function… Wrote some trials such as: javax.xml.namespace....
1
vote
0answers
36 views

How to fetch all profile metadata including object permission, field permisssion, record type etc. using Salesforce Tooling API

I am using workbench to retrieve a user profile using tooling API, but unable to retrieve any data in fieldPermissions, objectPermissions or recordTypeVisibilities files. Can anyone suggest me how to ...
1
vote
0answers
92 views

Tooling API not retrieving relationship name/label

Querying on Customfield using Tooling API in workbench is returning relationship label "null" even if object has the relationship field(lookup/master-detail). For Example: My Object has 3 relationship ...
1
vote
0answers
17 views

Uploading Self Signed Cert Through MetaData SOAP

I am trying to understand the right way to format a SOAP POST in order to upload a self-signed certificate into a scratch org. Based on here: https://developer.salesforce.com/docs/atlas.en-us....
1
vote
0answers
63 views

Tooling API: Fetch sObject details of Process builder

I know we can fetch Active Version and latest version details using Tooling API from FlowDefinition, however is there a way we can fetch sObject details? '/services/data/v43.0/tooling/query?q=Select+...
1
vote
0answers
220 views

unable to find end tag when query dependencyApi

I'm trying to run the query "SELECT MetadataComponentId FROM MetadataComponentDependency" via tooling connection. and I get the following error- com.sforce.ws.ConnectionException: unable to find end ...
1
vote
0answers
54 views

Error Creating an ApexPage with standardController via ToolingAPI: INVALID_TYPE : sObject type 'Case' is not supported

I am trying to create a ApexPage via Tooling API, that includes a standardController, following this example: Creating Visualforce Page Using Tooling API However it throws the following error: ...
1
vote
1answer
106 views

Tooling API Queries in Dev Console only show one row

When submitting a SOQL query in the Dev Console using the Tooling API only one result row shows, even though more overall rows are returned, as confirmed by the "Query Results" notice above the ...
1
vote
0answers
31 views

Lightning App Builder: how to check if an app is active?

I have created an app via Lightning App Builder called testApp how can you verify if the app is activated using Rest API/SOQL/APEX? I have tried using FlexiPage but it does not support field that ...
1
vote
1answer
107 views

trying to retrieve Symbol Table through tooling API takes too long

I am trying to retrieve SymbolTable from Tooling API, but it takes too long to retrieve that. Also like when I try to access the SObject from the ToolingAPI package, I am not getting any option like ...
1
vote
0answers
84 views

How to delivery Salesforce API access in Managed Package when using Lightning Component

Trying to build managed package that can analyze metadata configuration, flow specifically. Building as Lightning Component. Looking for a solution to delivery a Named Credential capable of accessing ...
1
vote
1answer
439 views

Querying LeadStatus (including inactive)

It is trivial to retrieve all active LeadStatus values through the REST APIs, but I cannot see a way to pull in the inactive ones. SOQL query to retrieve active lead statuses: SELECT Id, ApiName ...
1
vote
0answers
132 views

Metadata/Tooling API - Identify orphaned email alerts (workflow actions no longer associated to an workflow)

I was looking to cleanup some of our orgs metadata and identify the email alerts that do not have an active workflow. Is there a way, besides parsing the metadata and finding metadata tag matches on ...
1
vote
0answers
52 views

Unable to get ApexPageMember ID Tooling API

I'm new to Tooling API and I'm trying to update an existing Visualforce page from a class through Tooling API by Tooling API ApexPageMember object. However, I am unable to create the ApexPageMember ...
1
vote
0answers
157 views

Create new classes by Tooling API

I have a problem with creation new APEX classes by using #Tooling API. In first scenario, I want to create one class: Steps: Create MetadataContainer By using MetadataContainer Id, create ...
1
vote
0answers
113 views

Cannot update Managed Package ValidationRule

I built a Validation Rule for a Managed Package object in my org (so this new rule is not part of the managed package). When I got to update that object's Metadata "Active" field, I get this error: '...
1
vote
1answer
299 views

Deleting the trigger through apex code

I want to delete the apex trigger using code.I used tooling API to create a trigger dynamically through apex code... Now I want to delete the trigger on click of one button in code itself, but not ...
0
votes
0answers
13 views

How to Resolve provide a valid Metadata field for LightningComponentBundle in tooling API

ADBComponent.ApiVersion = 46; ADBComponent.IsExposed = true; ADBComponent.Description = "LWC Controller"; ADBComponent.FullName = templatename; ADBComponent....
0
votes
1answer
55 views

Lightning Usage/Adoption Reports and Metrics (e.g. most viewed pages, switches to Classic, etc.)

Salesforce's native "Lightning Usage App" app (Summer '18) includes several reports with metrics around page views, load times, mobile activity, etc. I find the "Most Viewed Pages" usage report below ...
0
votes
0answers
37 views

API Usage Notifications - How to subscribe not via UI, e.g. using API, ant deployment etc

When spinning up new sandbox from production we need to subscribe our admin user to receive 'API Usage Notifications'. So in order not to do it manually every time, we are looking for a way of how to ...
0
votes
0answers
55 views

Create a StandardValueSet via Tooling API

I am currently working on StandardValueSet and I would like to try to insert an entry in the said resource. I looked at the documentation and it sort of lacks the necessary information for me to be ...
0
votes
1answer
30 views

How to automate my Post production refresh steps like updating the configuration through Apex code using Tooling/Metadata API

After every production refresh of Sandboxes I have to perform manual steps updating Custom Label, Remote Site Settings, Named Credential, Custom Settings and Custom Metadata. How can I automate the ...
0
votes
0answers
26 views

Updating globalvalueset from the batch and sorted field is getting checked and unchecked automatically

Hi Guys i am updating globalvalueset from batch and sorted is true everytime but when i run the batch first time and if sorted checkbox is not checked then its getting checked. and when i run the ...
0
votes
0answers
31 views

How to assign record type to dependent picklist(from global picklist) in APEX

I have global picklist 'Country' In my Address object i have picklist 'Country' which was created as a dependent picklist from globalpicklist. Can we assign existing custom record type to this ...
0
votes
1answer
149 views

Retrieve LastModifiedBy from FieldDefinition query

I am able to retreive field definition for a custom object except last modified by. below is my SOQL. select Label, DeveloperName , DataType, IsCalculated, RelationshipName from FieldDefinition ...
0
votes
1answer
20 views

Can CompanySettings be retrieved using the Tooling API?

The CompanySettings object can be retrieved using the Metadata API. However it requires using SOAP and zip files. Is there a way to retrieve it using the, much simpler, Tooling API?
0
votes
0answers
159 views

Retrieve API Names of all components from salesforce

I want to retrieve API names of all the components from Salesforce Org. I used Force.com Migration tool(ANT) to retrieve Component names but I am getting the label of all the components. For Ex. ...