@RemoteAction
global static List<pba_listingobj__c> getAccountstages(String namejs)
{
return [SELECT sales_stage__c FROM pba_listingobj__c where Account_lookup__r.Name=:namejs GROUP BY sales_stage__c];
}
Where Account_lookup__c
is Lookup to Account
.
Field name: Account_lookup__c
How to have unique Stages (sales_stage__c
)(values can be : Closed Won, Prospect)?
Records:
Prospect
Closed Won
Closed Won
Closed Won
Desired Output: As shown in the above screenshot.
Prospect
Closed Won