Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 2984

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.

1 vote
Accepted

How to sort newly created Picklist Choices?

The UI uses the sorted property to override the input order and alphabetize the values according to their label. This is a UI-only feature. If you want to do this in code, you'll have to sort the valu …
sfdcfox's user avatar
  • 502k
1 vote
Accepted

How to get pagelayout assigned to a non admin users in apex

It appears that you're looking for the getRecordCreateDefaults method. This requires no Apex and returns the layout assigned to the user, optionally based on the record type, if specified. From there, …
sfdcfox's user avatar
  • 502k
2 votes
Accepted

Programmatically list all Profiles and compare the permissions

Apex Code exposes PermissionSet, SetupEntityAccess, FieldPermissions, and ObjectPermissions, so you can directly query these objects as if they were normal sObject entities. In other words, you don't …
sfdcfox's user avatar
  • 502k
8 votes

Is there a *public-facing* list of GACK codes?

The GACK ID values are derived heuristically, and are only meant for grouping crashes with the same root cause together, in order to define the frequency of the crash. It is up to a human to read the …
sfdcfox's user avatar
  • 502k
0 votes

How to bulk remove components from an unlocked package?

Just create a new package version that contains no elements (or perhaps some dummy element), and use the upgrade type "DeprecateOnly" when upgrading. All of your metadata will be in a Deprecated statu …
sfdcfox's user avatar
  • 502k
3 votes

How to use tooling api to query data in Apex

You can build a JSON helper class, then call the endpoint and deserialize. Here's a quick example I wrote up that will copy-paste execute in Execute Anonymous. You'll have to put the classes and metho …
sfdcfox's user avatar
  • 502k
3 votes
Accepted

Is it possible for an apex classe to update code of another apex class at runtime?

Technically, there's nothing stopping you from calling the tooling API or metadata API directly from Apex. However, code changes always require running all tests in production, so you would find that …
sfdcfox's user avatar
  • 502k
1 vote
Accepted

How to get all the available set of CustomField data types?

The available types are listed in several places, CustomField being one. I'm not sure if there's a way to actually "describe" these values dynamically; the Tooling API only describes the field as a "c …
sfdcfox's user avatar
  • 502k
1 vote
Accepted

Read single ApexClass/ApexTrigger metadata files without using retrieve call

You can use the following format to get any record without using an ID: /services/data/vXX.X/*/sobjects/**EntityName**/**ExternalIdField**/**ExternalIdValue** For example, you can use: /services/data …
sfdcfox's user avatar
  • 502k
2 votes

How to remove key-value from JSON

That's as simple as: for(RootObjectMetadata.MetadataRecords records: parsedResponse.records) { records.id = null; } You don't need anything more complicated than that.
sfdcfox's user avatar
  • 502k
3 votes
Accepted

How to indent code in apex class created using tooling API

You can use \r and \t to format your code. You can also make your code easier to read with some proper JSON encoding: public class ApexClassWrapper { public String Name; public String Body; } Ape …
sfdcfox's user avatar
  • 502k
0 votes

LWC html tries to load data before it is completed

You just need to make the property reactive: @wire(getDynamicTableDataList, {TableName: '$objRecId'}) Now that your wire handler will be called at least twice, once with no data, and once with the pr …
sfdcfox's user avatar
  • 502k
1 vote

Tooling API - Query sObject not support error

The Tooling API doesn't support standard record objects. It's meant to be a way to access metadata objects, such as ApexClass and CustomField, particularly in a way that you'd use it for "tooling" (me …
sfdcfox's user avatar
  • 502k
1 vote

Is there a command you can use to get a list of all features that are currently active in an...

There's not a built-in command, but this is where Salesforce DX plugins can help. browserforce, written by Matthias Rolke, is a plugin that allows you to retrieve an org configuration and deploy it to …
sfdcfox's user avatar
  • 502k
5 votes
Accepted

Use cases of different Salesforce APIs

In Salesforce, we have two general types of data: data, and metadata. Data are individual records, such as an Account record, or a User record. Metadata is configuration that describes the "shape" of …
sfdcfox's user avatar
  • 502k

15 30 50 per page