Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @AuraEnabled
- public static Map<String, String> retrieveTranslationsMap(){
- Map<String, String> response = new Map<String,String>();
- Schema.DescribeSObjectResult objectSchema = objectApiName.SObjectType.getDescribe();
- Map<String, Schema.SObjectField> objectFieldMap = objectSchema.fields.getMap();
- response.put('objectApiName', objectSchema.getLabel());
- response.put('Field1ApiName', objectFieldMap.get('Field1ApiName').getDescribe().getLabel());
- response.put('Field2ApiName', objectFieldMap.get('Field1ApiName').getDescribe().getLabel());
- return response;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement