/** * getAllAllowedFieldsForCurrentUser * @param objectAPI, Object Api Name * @return String.join(fieldList, ','), all the fields concatened, separated by "," */ private static string getAllAllowedFieldsForCurrentUser (string objectAPI) { return string.join(new List<String>(Schema.getGlobalDescribe().get(objectAPI).getDescribe().fields.getMap().keySet()), ','); }