You need to sign in to do that
Don't have an account?
ms0713
Is it possible to get list of folders of Email Template using listMetadata() ?
ListMetadataQuery query = new ListMetadataQuery();
query.type = "ApexClass";
double asOfVersion = 23.0;
// Assume that the SOAP binding has already been established.
FileProperties[] lmr = metadataService.listMetadata( new ListMetadataQuery[] { query }, asOfVersion);
if (lmr != null)
{
foreach(FileProperties n in lmr)
{
string filename = n.fileName;
}
}
I m using this code to get list of Apex classes.
I want list of folders for //***query.type = "EmailTemplate";***// component type.
Is it possible using listMetadata() method or any other way to achieve this?
please reply asap.
thanks in advance.
Folder[] x = [select Type from Folder where Type = 'Email'];
system.debug(x);
All Answers
Have you tried querying the Folder object where Type = Email?
I have tried it and it gives me error like "INVALID_TYPE: Unknown type:Email".
I don't know. The query works fine with Apex and SOQL within Salesforce.
By the way, I am using it in C# and previously provided code was in C#.
But can you give me the code that works fine with SOQL and Apex.
Thanks.
Folder[] x = [select Type from Folder where Type = 'Email'];
system.debug(x);
Now i want list of all the Standard objects.
Can you help me?
Reply ASAP.
Thanks.