| | |
| | | result.success = true; |
| | | result.errors = new List<String>(); |
| | | // 定义字符串列表,其中包含若干 sObject 的 API 名称 |
| | | List<String> objTypeList = new List<String>{'Account', 'ExampleCustomObj__c'}; |
| | | //List<String> objTypeList = new List<String>{'Account', 'ExampleCustomObj__c'}; |
| | | // 得到 Account 和 ExampleCustomObj__c 的信息 |
| | | Schema.DescribeSobjectResult[] results = Schema.describeSObjects(objTypeList); |
| | | //Schema.DescribeSobjectResult[] results = Schema.describeSObjects(objTypeList); |
| | | return result; |
| | | }catch(Exception e){ |
| | | result.success = false; |