I stored all the editable fields in a variable and calling the variable in a dynamic SOQL query. My Query:
String fieldApiList = String.join(fieldsApiNames, ','); query = 'SELECT Name,'+ fieldApiList +' from EP_Service_License__c WHERE ID IN:recordIdSet'; SelectedEpserviceRecords=Database.query(query);
my requirement is, if any field value is null or blank in the selected records or any field values is same in all the selected records then I should not display that field. For example, here in the picture, product license number is same for all the selected records and Copy Primary Prod Co License(s) field is null for all the selected records. Now, I should avoid displaying those two in the output. This should happen dynamically for all the fields.
Kindly help me on this