You need to sign in to do that
Don't have an account?
vijendahr k
fetch distinct records from the list of records employee id and based on its related modifed date.
Hello all,
could you please help me get all the distinct records basaed on changed by(Emp id) and changed on fie( datetime) ,below is query
list<Contact_Audit__c> aulitList =[SELECT Name, Changed_By_Name__c, Contact_ID__c, Changed_By__c, Changed_On__c, Change_Type__c FROM Contact_Audit__c where Contact_ID__c = 'xxxxxxx']
in this query Changed_On__c is list of employess emp1, emp2, emp3..
Change_Type__c captures last modifed by records, but i need a distinct record of employee based on recent last modified by records Example
in this list i need only records like
Can any one tel me how to get distinct records based on employee and his changged type(dateTime) using salesforce or some method.
Please suggest me correct way
could you please help me get all the distinct records basaed on changed by(Emp id) and changed on fie( datetime) ,below is query
list<Contact_Audit__c> aulitList =[SELECT Name, Changed_By_Name__c, Contact_ID__c, Changed_By__c, Changed_On__c, Change_Type__c FROM Contact_Audit__c where Contact_ID__c = 'xxxxxxx']
in this query Changed_On__c is list of employess emp1, emp2, emp3..
Change_Type__c captures last modifed by records, but i need a distinct record of employee based on recent last modified by records Example
Changed_On__c--Change_Type__c emp1 ------- 01 emp1 ------- 02 emp1 ------- 03 emp2 ------- 01 emp2 ------- 02 emp2 ------- 03 emp3 ------- 01 emp3 ------- 02 emp3 ------- 03
in this list i need only records like
Changed_On__c--Change_Type__c(date) emp1 ------- 01 emp2 ------- 01 emp3 ------- 01
Can any one tel me how to get distinct records based on employee and his changged type(dateTime) using salesforce or some method.
Please suggest me correct way
Best Answer chosen by vijendahr k
Raj Vakati
Hi Vijaya, You have to write apex logic to get such result.Please refer sample code here and try some thing similar