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 ...
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'...
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 ...
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 ...
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 ...
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. ...
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" ...
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 ...
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 ...
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....
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tooling × 25tooling-api × 12
api × 9
rest-api × 6
apex × 4
metadata × 4
picklist × 2
visualforce × 1
lightning × 1
salesforcedx × 1
batch × 1
soap-api × 1
code-coverage × 1
metadata-api × 1
custom-field × 1
rest × 1
soap × 1
fields × 1
custom × 1
c# × 1
wsdl × 1
object × 1
python × 1
aggregate × 1
node.js × 1