Skip to main content
4 votes
Accepted

Create custom field type picklist via tooling rest api - which meta information required?

After searching and testing two days, finally posting here and searching on I now found the working solution. So the following code connects to Salesforce Org and adds a new custom field ...
HeXor's user avatar
  • 287
3 votes
Accepted

Tooling API in Batch Apex?

Could I run Rest(Tooling) API in Start method? I'm not sure, if that is even possible . But If that is , what should be passed to 'Database.queryLocator? Yes, you're allowed a callout. But you wouldn'...
sfdcfox's user avatar
  • 502k
3 votes
Accepted

Querying all the SandboxInfo via REST API

The trick we had to understand is that sObjects are not implementing REST resource "collection" default behaviour, i.e. GET /services/data/v40.0/tooling/sobjects/SandboxInfo/ will non return all the ...
Edmondo's user avatar
  • 1,712
3 votes
Accepted

Is this possible to access Tooling API or REST API or SOAP API or Metadata API from Lightning Application

Please see this post: How to call a Salesforce REST URL from Lightning Component? Currently, the only solution is to put the session ID in VF and getContent on that. This session ID is different ...
jmdohn's user avatar
  • 1,104
2 votes
Accepted

Missing ApexTestRunResult Data

They most certainly do get automatically deleted. If they weren't purged periodically they would eventually add up to a significant number of records. Looking in the Dev org I'm currently connected ...
Daniel Ballinger's user avatar
2 votes
Accepted

ApexTestResultLimits in Tooling API work for both synchronous and asynchronous runs?

Through manual testing, I believe the ApexTestResultLimits.LimitContext field is not displaying what you would logically assume it is. It doesn't appear to be related to what the documentation claims. ...
Daniel Ballinger's user avatar
2 votes
Accepted

Aggregate Query issue using Tooling API / Partner/SOAP API with C#

The Response structure of SELECT Count() and SELECT Count(Id) is bit different and that why it causes the casting to fail. Response of SELECT COUNT(Id) in tooling api Query. <?xml version="1.0" ...
Pranay Jaiswal's user avatar
2 votes
Accepted

How to create visible (FLS and in all Layouts) custom field via API

There's no real magic to it. You must create all of the other metadata changes that you expect to have happen. For Layouts, you'd have to pull the existing Layout metadata, make changes to it to add ...
David Reed's user avatar
  • 93.7k
2 votes
Accepted

Tooling API - update a picklist to not be restricted

{ "message": "Could not resolve standard field's name.", "errorCode": "FIELD_INTEGRITY_EXCEPTION", "fields": [] } is an unfortunate red ...
identigral's user avatar
  • 7,815
1 vote
Accepted

Salesforce Apex Class 99 %. Is there any way I can extract the classes which are not being run or not used any Internal or external system

I am the CTO of Metazoa and we build a suite of tools that can detect and remove unused Apex Classes, unused Methods, and duplicate Methods. Here is a white paper on how it works: https://www.metazoa....
Bill Appleton's user avatar
1 vote

How do I get the logs (results) of executing anonymous Apex code in jsforce?

You would query the ApexLog object (tooling API), then get the log's contents via /sobjects/ApexLog/id/Body/. I don't know if there's a more straightforward way to get at this (sfdx force:apex:execute ...
sfdcfox's user avatar
  • 502k
1 vote

Define Object Fields (Custom) Usage and Compare Metadata Between Similar Fields

Salesforce provides Salesforce Optimizer which provides a report for clean up purpose (one of the purposes). You should use this rather than building for scratch. Salesforce Optimizer evaluates the ...
Santanu Boral's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible