Linked Questions

41 votes
4 answers
14k views

Why is Schema.describeSObjects(types) Slower Than Schema.getGlobalDescribe()?

I was about to reconfigure some of my code to use the newer Schema.describeSObjects(types) method that I had heard was faster than using a globalDescribe. I made some code to quickly check this and ...
Caspar Harmer's user avatar
0 votes
0 answers
22 views

How Schema.getGlobaldescribes().get(sObjectAPIName) works, what is the path system takes? [duplicate]

In dynamic APEX, as mentioned by SF that describe calls are heavy. So when we do the following Schema.getGlobaldescribes() - it picks org's all objects. Schema.getGlobaldescribes().get(SObjectAPIName)...
Rohit's user avatar
  • 733
4 votes
1 answer
875 views

How do I tell if a custom metadata type field is a Field Definition?

I have the following code: public static void getFields(){ SObject obj = (SObject) Type.forName('Health_Cloud_Integration_Settings__mdt').newInstance(); DescribeSObjectResult describe = obj....
MetadataBaiter's user avatar
0 votes
1 answer
3k views

How to use custom metadata to map generic JSON

I want to create a generic REST API Webservice where the configuration of mapping fields can be done trough custom meta data. How would I set this up?. I want to be able to have an administrator add ...
Thomas's user avatar
  • 2,320
0 votes
1 answer
2k views

How to dynamically get name of object JSON String

I want to create a generic webservice. As I understood going the way of using Schema.getGlobalDescribe() will result in performance issues. I decided to try using JSON Schema trough Custom metadata ...
Thomas's user avatar
  • 2,320
1 vote
1 answer
902 views

Why does my custom metadata field defintion query not work?

I'm reading the answer to this following question: How to get a field's API name when querying a field of datatype, Metadata Relationship(Field Definition) However, when I run the following ...
MetadataLater's user avatar
0 votes
1 answer
938 views

Creation of Custom Metadata in a Managed Package

This is an expansion to this question by Robert. Originally he did not put "Managed Package" in the title so I feel like most of the answers missed that part. I am building a managed package ...
Arthlete's user avatar
  • 5,039
0 votes
0 answers
1k views

How to display the field label in combobox using lwc

I am using Apex class to fetch all the fields of the SObject. And i want to display all the field label into the component so i am using lwc to create a component Successfully ii am getting all the ...
Harshit Verma bluCursor's user avatar
2 votes
2 answers
287 views

How to get the local object from a string in the managed package?

Our managed package has a namespace, say DemoApp, and a custom object named Form__c, the client's org also has a custom object Form__c According to the doc here: https://developer.salesforce.com/docs/...
Adam's user avatar
  • 469
2 votes
1 answer
275 views

Is it possible to get valuetypes of fields of a JSON object without using getGlobalDescribe() [duplicate]

I have the following piece of code to get the valuetype. Is it possible to do this with getSObjectType() instead of getGlobalDescribe() since this is a lot slower. Apex Map<String, Object> ...
Thomas's user avatar
  • 2,320
1 vote
1 answer
145 views

Apex action in screen flow does not take real time values from the fields on the record page

I have a screen flow on case record page. The flow starts with this screen - On clicking the Next button an apex action will run to check all the fields for null values. If there are fields with null ...
sumchans's user avatar
  • 887