0
我想使用Salesforce元數據API緩存元數據組件的列表,例如ApexClass。Salesforce元數據apis
我得到的所有的Apex類的列表(總量不爲2246),它們在Salesforce的使用下面的代碼和它的花費過多時間來檢索這些文件的名稱:
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;
}
}
我的要求是獲取由我的組織開發的元數據組件(Apex類)的列表,以便我可以獲得與我相關的Salesforce元數據組件,並且可能可以通過不獲取所有類來節省我的時間。
我該如何實現這一目標?
儘快回覆。
在此先感謝。