Which two ways can the developer retrieve the available fields if the - ProProfs Discuss
Advertisement

Which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object? A developer needs to display all of the available fields for an object.

Which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object?
A developer needs to display all of the available fields for an object.

Change Image    Delete



Asked by Zslaykz, Last updated: Nov 09, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

zslaykz

zslaykz

zslaykz
Zslaykz

Answered Jan 30, 2019

Use getGlobalDescribe()get(myObject).getDescribe().fields.getmap () to return a map of fields
Use schema.describeSObjects(new String[] {myObject}[0].fields.getMap() to return a map of fields
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.