I want to do what Eclipse is doing: pull metadata for Standard objects. I basically need to inspect what Views, WebLinks, and Validation Rules Opportunity has in my org. For Custom objects I do the following:
SFDCMetadata.RetrieveRequest rr = new SFDCMetadata.RetrieveRequest();
SFDCMetadata.Package package = new SFDCMetadata.Package();
SFDCMetadata.PackageTypeMembers ptm = new SFDCMetadata.PackageTypeMembers();
ptm.name = "CustomObject";
ptm.members = new string[] { "*" };
package.types = new SFDCMetadata.PackageTypeMembers[] { ptm };
rr.singlePackage = true;
rr.unpackaged = package;
SFDCMetadata.AsyncResult res = port.retrieve(sh, null, rr);
Thread.Sleep(1500);
SFDCMetadata.RetrieveResult retRes = port.checkRetrieveStatus(sh, null, res.id);
while (!retRes.done)
{
Thread.Sleep(1000);
retRes = port.checkRetrieveStatus(sh, null, res.id);
}
List<FileInfo> fis = DecompressToFiles(retRes.zipFile, folderName);
But I get back only a collection of custom objects. How do I retrieve the standard objects, like Eclipse does:
How do they do it?