Created
October 5, 2015 12:46
-
-
Save tyoshikawa1106/6d42eb50f78d2757caf2 to your computer and use it in GitHub Desktop.
Apex Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// オブジェクト情報 | |
System.debug(Schema.getGlobalDescribe().get('Account').getDescribe()); | |
// オブジェクトの項目情報 | |
Map<String, Schema.SObjectType> m = Schema.getGlobalDescribe() ; | |
Schema.SObjectType s = m.get('Account') ; | |
Schema.DescribeSObjectResult r = s.getDescribe() ; | |
Map<String, Schema.SObjectField> fields = r.fields.getMap() ; | |
for (String f : fields.KeySet()) { | |
System.debug(f); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment