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
5
votes
1answer
1k views

Describe not returning Inactive picklist values via API

I'm using Partner API to describe salesforce schema. For some reason, in picklist fields I only see the active values (although there's a field "getActive()") Is this a limitation or am I doing ...
0
votes
1answer
20 views

Inserting records to ContentFolder and ContentWorkspace

Good day! I wanted to programmatically create a library. Manually in lightning mode you need to navigate to Files tab and then choose Libraries and then click the New Library button. Supply a name ...
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....
3
votes
1answer
67 views

Is it possible to discover a sandbox version with a API request to a sandbox?

We built and are enhancing a "Salesforce Sandbox Manager" to allocate Salesforce sandboxes to our Jenkins CI/CD and occasionally facilitate other sandbox management tasks. We'd like our manager to ...
0
votes
1answer
363 views

How to list all metadata of a sobject through salesforce tooling api by SOAP call?

I am trying to fetch metadata related to an sobject by SOAP call through Tooling API. For example, I am trying to fetch all the Apex Pages available in my org but unable to find any relevant API in ...
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....
1
vote
1answer
20 views

Making additional (custom) metadata available for a field

I am looking for a way to add additional metadata to object fields for use by some Salesforce and non-Salesforce UI code. What I need is a small piece of custom JSON per field. (Yes I could create a ...
1
vote
1answer
434 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 ...
0
votes
1answer
52 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 ...
1
vote
1answer
65 views

INVALID_TYPE: sObject type 'InstalledSubscriberPackage' is not supported

I'm querying the tooling API via some external C# code to get a list of installed packages. SELECT SubscriberPackage.Name, SubscriberPackage.NamespacePrefix, SubscriberPackageVersionId FROM ...
2
votes
1answer
102 views

SOQL query of MetadataComponentDependency: “Dependency API is not enabled”

I'm trying out the Dependency API (Winter '20 beta release) to help me draw package boundaries. I ran a test query from the Dev Console using the Tooling API but immediately hit the error [object ...
0
votes
1answer
30 views

Tooling API response, how to print in log?

I’m trying to print (system.debug) the response returned from tooling API but the debug is not displaying anything. So, I was wondering if the code below is correct. HttpRequest req = new HttpRequest(...
2
votes
4answers
60 views

Querying Apex Classes & Dependent Test Classes

Does anyone have any advice on how I can go about querying test classes and dependent test classes? Our Org is getting very large and finding the correct test classes for each class is becoming an ...
1
vote
1answer
55 views

sObject type 'MetadataComponentDependency' is not supported

If I understand correctly MetadataComponentDependency supports standard and custom fields on standard objects, but neither on custom objects. Will it eventually support standard and custom fields on ...
2
votes
1answer
80 views

Rest Tooling Api - Execute Anonymous Apex - Callout loop not allowed

First question on here, so please forgive me any errors in how I've posed my question. A little context The instance I work on has a lot of integrations with external systems. We perform 100.000's ...
0
votes
1answer
27 views

SymbolTable not supported

I am trying to find the unused methods using the Query Editor in Developer Console. I have checked Use Tooling API. Running SOQL like below: SELECT Id FROM SymbolTable WHERE externalReferences = ...
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 ...
2
votes
2answers
94 views

Find out programmatically if a field can be tracked

I've grappled with this one for a long time, and I am almost sure it's a gap in the platform. The problem I have is that I need a way to find out all the fields that can be tracked. That is to say, ...
2
votes
1answer
121 views

Querying metadata of an entity via Tooling API

I am trying to query some basic information about an object with the tooling api. There is one field that I am really interested in but it seems that it is not possible to query it even though the ...
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 ...
1
vote
1answer
177 views

How to export data from the Developer console? [duplicate]

I have to remove around 300 inactive flows from our Salesforce org, for this reason I would like to export the results of a query from the developer console to a csv or text. I'm unable to use ...
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.
0
votes
1answer
351 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
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
1answer
28 views

Named Credential Tooling API SOAP Envelope

Attempting to switch from using custom setting to named credential for authentication. I've updated the http request endpoint to use the named credential but how to update the SOAP envelope to not use ...
1
vote
2answers
360 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 ...
0
votes
2answers
185 views

call tooling API when using lightning component [duplicate]

When I make request tooling API from Apex by using lightning component, the error This session is not valid for use with the REST API is responsed. Also, the response status code is 401, and status is ...
0
votes
3answers
88 views

How can I get the custom object Tooling API Id?

I want to get the custom object id using the custom object's API name. Please tell me the way how to get id. req.setEndpoint(domainUrl+'/services/data/v46.0/tooling/query?q='+ ...
0
votes
3answers
85 views

How to get custom object id dynamically using apex

How to get custom object id dynamically. I have created one button on UI called Create custom field and on click of that button, I want to redirect it to that custom object field creation page(object ...
2
votes
1answer
119 views

Unable to import binding 'SforceServiceBinding' with the Summer 19 Tooling API WSDL

I'm trying to update to the Summer `19 (v46.0) Tooling API WSDL in a .NET project. When I attempt to update the service reference from the v45.0 WSDL I get the following error from ...
10
votes
1answer
62 views

What is `apexCache` and `apexCacheWarmer` in tooling API?

I was exploring few bits using tooling API, and stumbled upon 2 endpoints that got my attention. They are /services/data/v45.0/tooling/apexCache and /services/data/v45.0/tooling/apexCacheWarmer ...
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 ...
5
votes
1answer
73 views

Is there a reliable way to know which SObjects are supported by a SOSL search?

Having some trouble as an ISV with dynamic SOSL. I have a search box that searches all records. When building the SOSL query, I only add objects that have the IsSearchable flag set to true on 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
22 views

update global picklist value by tooling api (cannot get session id) [duplicate]

I tried to update global picklist value by tooling api, but in UserInfo.getSessionID() the error SESSION_ID_REMOVED was shown. How can we get session id and update global picklist value? String ...
2
votes
1answer
120 views

How can i figure out if a process builder contains apex class call?

I have a lot of processes in my org. I have a requirement to list the processes which are calling an apex class i.e- If a process builder consists of an immediate action which is calling an apex class ...
1
vote
0answers
90 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 ...
0
votes
1answer
127 views

How to set the externalSharingModel for managed package objects using automation?

Related to System.runAs for CspLitePortal Profile Users recently started returning no rows, I am now wondering how to automate the setting of the external sharing model for some SObjects contained in ...
0
votes
2answers
64 views

Get NamespacePrefix for a given Package Id (in org with LMA app)

Is there a way to get the Namespace Prefix of Managed Package where I just have the Id of? Maybe it is helpful that my code sits in the same org as the LMA app in with its sfLma__Package__c objects. ...
1
vote
1answer
38 views

Bulkify the Tooling/Metadata API

Came across various articles and I couldn't find approach for bulkyfying the Tooling/metadata API. In this post, the most voted answer handles one request at a time. However what I am trying to ...
0
votes
0answers
29 views

can anyone describe difference between tooling api and metadata api in terms of usage? [duplicate]

can anyone describe difference between tooling API and metadata API in terms of usage? can you provide any useful blogs or links?
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....
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 ...
2
votes
0answers
72 views

Status=Unauthorized, StatusCode=401 when accessing the Tooling REST API [duplicate]

I am getting this HTTP error: Status=Unauthorized, StatusCode=401 When I try and access the Tooling REST API from an Lightning component Apex controller being used inside Salesforce, running as ...
1
vote
0answers
61 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+...
0
votes
1answer
41 views

How to fetch Declarative Metadata i.e. meta.xml file with Tooling API query?

Is there a way to fetch the meta.xml file via tooling api query? The meta.xml looks like this for apex class: <?xml version="1.0" encoding="UTF-8"?> <ApexClass xmlns="http://soap.sforce.com/...
0
votes
1answer
35 views

Tooling API: Unable to update existing GlobalPicklist

I'm able to create a global picklist -'Fruits' String fieldDef = '{"Metadata":{"customValue":[{"label":"Apple","valueName":"Apple"},{"label":"Orange","valueName":"Orange"}],"description":null,"...
0
votes
1answer
48 views

How to do Tooling API Query filtering name

/services/data/v45.0/tooling/query?q=select+id,FullName+from+globalvalueset+limit+1 I'm able to fetch the one of the records. /services/data/v45.0/tooling/query?q=select+id,FullName+from+...
1
vote
1answer
633 views

Error while querying workflow rules using tooling api

I am trying to run the following query in my developer console (using tooling api): SELECT Id,Name,NamespacePrefix,Metadata FROM WorkflowRule but get an error saying 'An unexpected error occurred.' ...
3
votes
2answers
2k 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.