Mytutorialrack

Salesforce Tooling API: To create unique development tools or apps for Lightning Platform applications, use the Tooling API. You can access smaller chunks of metadata by using the SOQL capabilities of the Tooling API for many different sorts of metadata. Creating interactive applications is better suited for Tooling API since smaller retrieves yield more excellent performance.

Salesforce Tooling API

Tooling API offers RESTful and SOAP interfaces.
You can, for instance, Enhance the Lightning Platform tools you already have with new features and functionalities.

  • Integrate dynamic modules into your corporate integration tools for development using the Lightning Platform.
  • Create customized development tools for a particular service or application.
  • Tooling API provides REST or SOAP access to metadata needed in developer tooling.

See Tooling API Objects for comprehensive explanations of the REST resources and SOAP calls that are supported by each Tooling API object.

When to Make Use of Tooling API: When you require granular access to an organization’s metadata, use the Tooling API. You can access smaller chunks of metadata by using the SOQL capabilities of the Tooling API for many different sorts of metadata. Creating interactive applications is better suited for Tooling API since smaller retrieves yield more excellent performance.

Notes about Tooling API Releases: To find out what’s new with the Tooling API, check out the Salesforce Release Notes.

REST Synopsis: If you’re using a language like JavaScript that isn’t strictly typed, use REST.

Policy for API End-of-Life: Check out which versions of the Tooling REST and SOAP API are available, supported, or not.

When to Make Use of Salesforce Tooling API

When you require granular access to an organization’s metadata, use the Tooling API. You can access smaller chunks of metadata by using the SOQL capabilities of the Tooling API for many different sorts of metadata. Creating interactive applications is better suited for Tooling API since smaller retrieves yield greater performance.

Tooling API can be simpler to use than Metadata API since it lets you modify a single piece inside a complex type. Additional use cases consist of:

  • Integration of source control
  • Ongoing incorporation
  • Apex classes or initiate the deployment process

The following are some particular tasks you can complete with the Tooling API:

  • Obtain the field’s metadata for an object.
  • Obtain the standard or custom object properties.
  • Handle functioning copies of Visualforce pages and components, Apex classes, and triggers.
  • Handle static resource file working copies.
  • Examine functional copies of Apex classes, triggers, Visualforce pages, and components for updates and mistakes.
  • Make adjustments for your company.
  • Overlay SOQL statements or Apex code on an Apex execution.
  • Run Anonymous Apex.
  • Create log files for other users or yourself.
  • Get access to heap dump and debug log files.
  • In custom objects, manage custom fields.
  • Results of access code coverage.
  • Conduct tests and handle test outcomes.
  • Control workflow and validation rules.

API Tooling

The tooling API has both updated and new objects.

Salesforce General Optimize search result layouts for an object for every organization profile.

Utilize the SearchLayout object’s new Profile, ProfileName, and ListLayout fields.

Determine which functions a given formula type supports.

A new FormulaFunctionAllowedType object should be used.

Removed: The FormulaFunction object no longer has the IsAllowedInEntityContext, IsAllowedInFlowContext, and IsAllowedInVisualforceContext attributes.

Alternatively, use the new FormulaFunctionAllowedType.

The Einstein Voice Assistant’s AssistantVersion, AssistantDefinition, AssistantSkillQuickAction, AssistantSkillSobjectAction, and AssistantContextItem support configurations are visible but solely for internal use. 

These objects have been added to the Tooling API Developer Guide and were first introduced in API version 47.0.

Packaging

When creating a package version, omit to validate the dependencies, package ancestors, and metadata.

Make use of the Package2VersionCreateRequest object’s new SkipValidation field.

Provision of services

Declare that managed packages allow for the addition of timesheet templates: Use the ManageableState and NamespacePrefix fields, which are two new features on the TimeSheetTemplate object.

To connect time sheets with profiles, use the template assignments for time sheets: Employ the just created TimeSheetTemplateAssignment object.

Lightning Path

Establish the context in which a flow operates.

Utilize the Flow object’s newly added RunInMode field.

Development

Enhanced creation of symbol tables: To make sure that managed packages don’t contain non-global implementation information, a symbol table is constructed. See Improved Symbol Table Generation for further details.

Provide URLs that your Salesforce organization can utilize to obtain Lightning component resources: Utilize the object CspTrustedSite. This item was added to the Tooling API Developer Guide in API version 39.0.

A change in behavior was observed in the permissions needed to access some Tooling objects.

  • In Spring ’20 and beyond, particular objects have additional access restrictions.
  • The View All Data and Author Apex permissions are required for users to access ApexClassMember or ApexTriggerMember.
  • Users need to have both the View All Data and Customize Application permissions in order to access ApexComponentMember, ApexPageMember, or ContainerAsyncRequest.
  • Users need to have the View All Data and either the Author Apex or Customize Application permissions in order to access MetadataContainer.
  • Users need to have the View Setup and Configuration permission in order to access OperationLog.

With Salesforce Tooling API, what can you do?

Get metadata: You can obtain Apex classes, Visualforce pages, Lightning components, and other metadata from a Salesforce organization by using the Tooling API. Additionally, debugging-related metadata, like stack traces and debug logs, can be retrieved.

Create and Update Metadata: Apex classes, Visualforce pages, and custom fields are just a few examples of the metadata that may be created or updated in a Salesforce organization using the Tooling API. Additionally, you can oversee the deployment of modified metadata and produce new versions of already-existing metadata.

Debugging: The Tooling API offers debugging tools for Apex code, such as the capacity to acquire debug logs and stack traces, establish and remove breakpoints, and control the debugging procedure.

Code analysis: Apex code coverage and dependency analysis are two of the code analysis tools available in the Tooling API. These tools can be used to find code segments that could need more testing or reworking.

Management of metadata: The Tooling API offers capabilities for handling version control, generating and distributing metadata packages, and resolving metadata conflicts in Salesforce organizations.

Flow

To get and update particular flow versions, use the Flow object.

You may use Flow to develop an application that leads users through a sequence of screens in order to edit and query database records. To create dynamic apps, you may also implement logic and offer branching based on user input. See Flow Builder in the Salesforce Help for details on the related UI-based flow construction tool.

When working with flows using the Tooling API, keep in mind that:

  • A flow installed from a controlled package has information that can be described but not its metadata.
  • Each time you update a flow version, the previous version is genuinely deleted, and a new version with a unique ID is created from it.
  • Set the Status field to active to start a flow.

As long as a flow version is not active and contains no paused interviews, it can be deleted. Interviews that have been interrupted in the flow version should either be deleted or waited to resume and conclude.

API 34.0 and subsequent versions support this object.

Supported SOAP Calls

create(), delete(), query(), retrieve(), update(), upsert()

Supported REST API HTTP Methods

DELETE, GET, HEAD, PATCH, POST

In summary

In conclusion, with a wide range of capabilities to improve code quality, automate deployment procedures, and speed development, the Salesforce Tooling API proves to be a flexible and invaluable tool for developers and administrators.

Organizations can fully utilize the Salesforce platform to drive innovation and success in their CRM initiatives by being aware of its possibilities and implementing best practices.

Share:

Recent Posts