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.
466
questions
0
votes
0
answers
28
views
Apex Create Lookup Field w Filters - Cannot deserialize instance of complexvalue from VALUE_TRUE value true or request may be missing a required field
I am attempting to create a Lookup field with Filter Criteria using the Tooling API.
Http http = new Http();
// Instantiate a new HTTP request
HttpRequest req = new HttpRequest();
req....
0
votes
0
answers
40
views
How to create APEX triggers in salesforce using jsforce library
I am trying to create an Apex trigger on the Account object using jsforce. I've successfully established an OAuth connection, and I can query and create records without any issues. I've also tested ...
1
vote
0
answers
30
views
How can I get SymbolTable of an ApexTrigger in production env
I'm trying to work with the SymbolTable via the Tooling API (I'm calling it from outside the org via SOAP / Oauth).
I can get the SymbolTable for an ApexClass without issue.
(It's a field directly on ...
0
votes
1
answer
40
views
How to create a Flow using the Tooling API
I am trying to create a flow using postman, but I am getting this error:
Endpoint Url: https://surveysparrow-1d-dev-ed.develop.my.salesforce.com/services/data/v57.0/tooling/sobjects/Flow
Payload
{
&...
0
votes
0
answers
21
views
Cannot query LookupFilter by SourceFieldDefinitionId. Tooling API bug?
The Tooling API docs for LookupFilter list the field SourceFieldDefinitionId as "filterable", but any query I run while trying to filter that field returns no rows.
For example, this query ...
0
votes
0
answers
40
views
Flow - change status via Tooling API
I am working on updating a Salesforce flow using a Python script. The script connects successfully and retrieves the flow details, but fails to update the flow with the following error message:
Failed ...
0
votes
1
answer
32
views
It is possible to find all Mobile & Lightning Actions that are enabled for a particular Publisher Layout
We want to deprecate certain Global Actions that are registered for one or more Publisher Layouts.
By providing our customers a list of all Publisher Layouts where a certain Mobile & Lightning ...
1
vote
1
answer
41
views
Programmatically getting the major/minor/patch details for a 1GP managed package from its packaging org
I have a collection of package version IDs for a 1GP managed package that I want to translate into major.minor.patch format details. I had expected to be able to do this using a Tooling API query of ...
2
votes
1
answer
75
views
PATCH not supported by the /tooling/sobjects/CustomField HTTP REST endpoint?
The Tooling API CustomField documentation says:
Supported SOAP Calls
create(), query(), retrieve(), search(), update(), upsert()
Supported REST HTTP Methods
Query, GET, POST, PATCH
but when I try a ...
0
votes
0
answers
36
views
Why recordTypeVisibilities is an empty array in response to /services/data/{version}/tooling/sobjects/Profile/{profile.id}
I have configured several RecordTypes for Account entity and those show up under certain profile:
I am using super user when placing a call:
/services/data/{version}/tooling/sobjects/Profile/{profile....
0
votes
1
answer
44
views
SOQL on FieldDefinition object - "LIKE" and "NOT LIKE" Return Same Results?
Somehow, these two logically opposing queries return (almost) the same data.
How in the world do
EntityDefinition.QualifiedApiName LIKE '%ChangeEvent%'
and
NOT EntityDefinition.QualifiedApiName LIKE '%...
0
votes
0
answers
29
views
How to fetch CompactLayouts that are assigned to certain user profiles + record type ids
/services/data/v62.0/tooling/query?q=select+LayoutId,+RecordTypeId,+TableEnumOrId+from+ProfileLayout
I think the query above is only good for fetching page layouts? Even though I am not 100% sure. ...
3
votes
1
answer
277
views
Can't delete Apex class from production, deployment fails with "This Batchable class is in use. : Apex Sharing Recalculation", but no job queued?
I created a batch class to update some records a few days ago, and ran it on the same day. I left the class in production, unused, so I could delete it when I had some time to spare.
When I proceeded ...
0
votes
1
answer
96
views
system.limitexception: too many callouts: 101 error Salesforce
public with sharing class ToolingAPIUtility {
public static final String endpoint = '/services/data/v51.0/tooling/query/?q=';
@InvocableMethod(label='Get Alert Data' description='Get Alert ...
1
vote
1
answer
55
views
How to sort newly created Picklist Choices?
This is a very frustrating problem because I feel I am using the proper methods but just not getting the results.
I'm trying to sort this picklist I'm creating through Tooling API. I am using the ...
0
votes
0
answers
36
views
Picklist Choice Record Type visibility controlled by Tooling API
I'm updating picklist choices by using Tooling API callouts to the User object, pulling in user names based on their Role. This was working great (thanks to some great help from people on here). But ...
1
vote
1
answer
79
views
Using Tooling API Lookup To Update Picklist Choices
I'm trying to using a scheduled Tooling API Apex class to lookup Users with a specific Role and update the picklist choices with those results.
As it is now, I'm not getting any results. In the debug ...
0
votes
0
answers
38
views
How to add a new flow version using the Tooling API
I want to deploy a flow using Tooling API. However, if the flow already exists in the target org, I get this error :
The fullName: FlowDeploymentSample for Flow version is not unique.
0
votes
0
answers
75
views
OAuth2 connection inconsistency using JSforce
My Nodejs app has the option for users to sign-in using their devOrg. And my app is establishing an OAuth2 connection using authorization code grant. The whole sign in works perfectly fine. After the ...
0
votes
0
answers
41
views
Additional custom field created by Salesforce when change field type
I am playing around with Salesforce tooling API recently. And there is one custom field I created under standard object 'Account' with field type 'Text', API 'CusField__c'. When I change this custom ...
0
votes
1
answer
57
views
How can I test Sandbox related functionality without using Production itself as my test environment?
I am trying to build tooling around sandbox management but pretty much got stumped by how I would even test this without using Production.
My client app is intended to be build on Java and using the ...
0
votes
0
answers
28
views
Getting Invalid field ReplyToken__c for SObject Case: Markup while using tooling api to create an apexpage
here is the curl and response I am getting while trying to create an apex page
curl --location 'MY_DOMAIN/services/data/v54.0/tooling/sobjects/ApexPage'
--header 'Content-Type: application/json'
--...
1
vote
2
answers
82
views
How to query other namespaces via Tooling API (REST)
In the Tooling API Guide entry for AutoResponseRule, it says
More information about the autoresponse rule is available by querying the metadata type AutoResponseRules or AutoResponse in the metadata ...
0
votes
1
answer
45
views
Issue with Empty Results in ApexCodeCoverageAggregate after Validate with RunTest via ANT
I'm encountering an issue while trying to retrieve Apex class coverage after running a Validate with RunTest via ANT in Salesforce.
The problem arises because, for certain classes, the coverage report ...
-1
votes
1
answer
211
views
What is Formula Definition in the Entity Definition and how is it useful to run a report or SOQL query
I would like to know the logic added in the formula field. With the standard/custom reports I can get the list of formula fields created on one entity like case/account/custom objects however to check ...
0
votes
1
answer
423
views
How to deactivate all flows via sf cli
I'm trying to deactivate all active flows via sf data cli
I saw docs said we can deactivate if via Metadata field
You can activate and deactivate flows with the Metadata field.
Below command is ...
0
votes
1
answer
74
views
How can I update the External Data Source via Metadata Api or Tooling Api?
I have a record for External Data Source Named as ED1 which is password protected having below details.
DeveloperName ED1
Endpoint abc.com
IsDeleted FALSE
IsWritable FALSE
...
0
votes
0
answers
62
views
Create profile tooling API giving INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY
I created a CustomField using the tooling API: POST "tooling/sobjects/CustomField"
But it creates a custom field without the permissions on "Field-Level Security for Profile"
As I ...
1
vote
1
answer
205
views
Getting No such column error on PlatformEventChannel
I'm following documentation for integrating salesforce with AWS event bridge (HERE), but when I try to create a platform event channel With this payload:
{ "FullName": "...
1
vote
1
answer
383
views
How to get field references in Reports/ReportTypes?
I am trying to solve a problem of many unused field in my org.
This will be addressed by running a periodic job that will figure out the field usage via number of references and letting the audience ...
0
votes
0
answers
66
views
How to find the connected application from the endpoint
There is a spike in API calls being made with my user. I cannot figure out which application is causing these spikes. I created a ticket with Salesforce and the only information they can give me is ...
1
vote
1
answer
146
views
What are the database values for Status of SandboxProcess in the Tooling API?
Does anyone know of a reference for the database values of the SandboxProcess.Status field in the Tooling API?
I want to query SandboxProcess, but filter out the Deleted and Deleting records in the ...
2
votes
2
answers
359
views
How to get pagelayout assigned to a non admin users in apex
I am trying to get pagelayout assigned to a user by querying ProfileLayout Object. I am running this query.
select Layout.FullName from ProfileLayout where
ProfileId='xxxxxxxxxxx' and recordtypeId = '...
1
vote
1
answer
165
views
Where are Bulk API queries to MetadataComponentDependency supported
The documentation suggests that you can query MetadataComponentDependency using the Bulk API.
It seems to work fine in my scratch org sandboxes, but not in a DE org. Does anyone know if this is this a ...
0
votes
1
answer
135
views
Tooling API - sObject type 'SecurityHealthCheckRisks' is not supported
q="SELECT RiskType, Setting, SettingGroup, OrgValue, StandardValue FROM SecurityHealthCheckRisks"
[{"message":"sObject type 'SecurityHealthCheckRisks' is not supported.",&...
1
vote
2
answers
670
views
How to get the list of custom fields in my org which are used nowhere
How to get the list of custom fields in my org which are used nowhere?
I tried to do SOQL query MetadataComponentDependency object using Tooling API to get all component dependency records, but only ...
0
votes
1
answer
472
views
Programmatically list all Profiles and compare the permissions
I'm working on building a tool in Salesforce that allows me to compare two profiles. As part of this tool, I need to programmatically list all profiles in Salesforce along with their permissions. ...
5
votes
3
answers
2k
views
Is there a *public-facing* list of GACK codes?
While Salesforce's internal processes are somewhat shrouded in mystery, we have been allowed a high-level look at the GACK process.
What our team is noticing is that certain GACK IDs are consistent : ...
0
votes
2
answers
365
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 ...
1
vote
0
answers
190
views
Postman returning FIELD_INTEGRITY_EXCEPTION, on inserting PlatformEventChannelMember
In this trailhead: https://trailhead.salesforce.com/content/learn/projects/create-a-custom-channel-and-enrich-change-events/add-a-channel-member-and-configure-change-event-enrichment
I'm trying to add ...
1
vote
1
answer
765
views
Activating Flow Using Flow Tooling API
I have requirement to activate flow using tooling API { Not through deployment }
I am trying to use below endpoint with body
services/data/v56.0/tooling/sobjects/Flow/{Id}
Response
{
"...
0
votes
1
answer
2k
views
How to use tooling api to query data in Apex [duplicate]
I want to retrieve the test-coverage with tooling-soql query
SELECT ApexClassOrTrigger.Name, NumLinesCovered, NumLinesUncovered FROM ApexCodeCoverageAggregate ORDER BY ApexClassOrTrigger.Name ASC
It ...
2
votes
0
answers
133
views
Package version creation failed Invalid type: EntitySubscription
I am getting the below error when I am trying to create a patch version.
Package version creation failed with an unknown error. Invalid type: EntitySubscription.
This Sobject is available in the ...
-3
votes
1
answer
138
views
Is it possible for an apex classe to update code of another apex class at runtime? [closed]
Currently, I am trying to update specific references in my apex code with something else, for example, changing all variables having name as LOG to Log, I know it can be done via vs code's replace all ...
4
votes
0
answers
545
views
Can I get flow interview details using APEX/Metadata/Tooling API for any specific record?
My Use case:
I have created a trigger flow on Lead to run after 3 days of lead creation.
I want to show the interview status in a LWC component
Users can pause/reschedule interviews from the LWC ...
0
votes
1
answer
187
views
Why Tooling API doesn't support composite/sobjects resource? [duplicate]
The documentation for Tooling API suggests that Tooling API supports composite/sobjects resource
Update Multiple Records with Fewer Round-Trips Use a PATCH request
with sObject Collections to update ...
0
votes
1
answer
176
views
How to get all the available set of CustomField data types?
I am working on a requirement to create CustomField from a LWC form. I am able to use Tooling API to create customfields of type 'text'. I want to extend this functionality to other data types as well....
0
votes
1
answer
4k
views
Unable to get an Access token using a named credential and getting a State not Send OAuth Error
I am trying to get SF access token using a named credential as that is the secure way as mention here:
I am basically unable to login successfully and get the following error :
No_Oauth_State&...
4
votes
1
answer
87
views
Missing collection information (Parameterized Type) in SymbolTable
I've just started working with ApexClass.SymbolTable from the ToolingAPI. In the documentation, a SymbolTable entry contains properties, variables, and methods which have parameters. The ...
2
votes
0
answers
223
views
Is there a way to access Tooling API METADATA objects without granting “View Setup and Configuration“ permission?
When trying to access METADATA (Setup) objects (such as FieldSet, Layout, ValidationRule, WorkflowRule, etc.) via Tooling API, without granting “View Setup and Configuration“ permission get the below ...