Retrieves a list of available objects for your organization’s data.
DescribeGlobalResult = sfdc.describeGlobal();
Use describeGlobal() to obtain a list of available objects for your organization. You can then iterate through this list and use describeSObjects() to obtain metadata about individual objects.
Your client application must be logged in with sufficient access rights to retrieve metadata about your organization’s data. For more information, see Factors that Affect Data Access.
private void describeGlobalSample() {
try
{
DescribeGlobalResult describeGlobalResult = null;
describeGlobalResult = binding.describeGlobal();
String[] types = describeGlobalResult.getTypes();
for (int i=0;i<types.length;i++)
System.out.println(types[i]);
getUserInput("\nDescribe global was successful.\n\n
Hit the enter key to continue....");
}
catch (Exception ex)
{
System.out.println("\nFailed to return types, error message was: \n" +
ex.getMessage());
getUserInput("\nHit return to continue...");
}
}
private void globalDescribe()
{
//Invoke describeGlobal call and save results in DescribeGlobalResult object
DescribeGlobalResult dgr = binding.describeGlobal();
// Iterate through the results
for (int i=0;i<dgr.types.Length;i++)
{
// The dgr.types[i] object is a string
System.Diagnostics.Trace.WriteLine(dgr.types[i]);
}
binding.describeSObject
}