Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. @AuraEnabled
  2. public static Map<String, String> retrieveTranslationsMap(){
  3.  
  4. Map<String, String> response = new Map<String,String>();
  5. Schema.DescribeSObjectResult objectSchema = objectApiName.SObjectType.getDescribe();
  6. Map<String, Schema.SObjectField> objectFieldMap = objectSchema.fields.getMap();
  7. response.put('objectApiName', objectSchema.getLabel());
  8. response.put('Field1ApiName', objectFieldMap.get('Field1ApiName').getDescribe().getLabel());
  9. response.put('Field2ApiName', objectFieldMap.get('Field1ApiName').getDescribe().getLabel());
  10. return response;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement