function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pradeep kumar yadavpradeep kumar yadav 

Can we split formula's using any language too fetch Object's Name and their field Names.

I have already fetched the value of formula field using Metadata API, and now I want to fetch ObjectNames with field Names .

Hi Pradeep,

We can find whether the given field is formula fields or not using isCalculated() DescribeFieldResult Method.
Please refer this link

To accesss ObjectNames:
Use the Schema getGlobalDescribe method to return a map that represents the relationship between all sObject names (keys) to sObject tokens (values),
Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();

To accesss Field Names :

Use the field describe result's getMap method to return a map that represents the relationship between all the field names (keys) and the field tokens (values) for an sObject.
Map<String, Schema.SObjectField> fieldMap = Schema.SObjectType.Account.fields.getMap();

pradeep kumar yadavpradeep kumar yadav
I want the list of all objects and fields that are used in Formula.