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
rajesh k 10rajesh k 10 

using apex Or metadata how get list of custom object id's and related List of field ids?

vijayk1.393339369954256E12vijayk1.393339369954256E12
Hi Rajesh,

This is not possible using apex. So for that you have to use "Tooling API" to retrieve custom object ids.

http://www.salesforce.com/us/developer/docs/api_toolingpre/api_tooling.pdf

Hope this will helps you.
rajesh k 10rajesh k 10
Hi Vijay,

thank u for replay

                  Using schema methods and Wrapper class I displayed all custom objects and Related fields with del and Edit commandlinks.How to perform delete functionality on delete Command link on custom objects and fields,

please help me..........
vijayk1.393339369954256E12vijayk1.393339369954256E12
You can delete custom object or custom field using metadata.

Please read the metadata components.

Example
AsyncResult[] = metadataConnection.delete(Metadata[] metadata);
rajesh k 10rajesh k 10
Hi vijay,

                   Using this i deleted fields but this is not working on objects.In fields also  i deleted one field automatically all fields will be deleted and  following error will be come

(i think using id's only possible custom objects and fields that's why i am asking using wrapper class how to get field id's and object ids) this is my lat requirement

System.LimitException: rajesh:Too many callouts: 11
Error is in expression '{!doDelete}' in page createfields

Class.rajesh.MetadataService.MetadataPort.deleteMetadata: line 8470, column 1
Class.rajesh.MetadataController11.doDelete: line 22, column 1

please help me