• Nitish Pisal
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
How do I allow a initial submitter of an approval process which is not a Salesforce admin to ReAssign the approval request to a reviewer after it has been submitted for approval.

I know Admins can do it since they can see and option to Reassign the request but how do I give the same permission to a user which is a submitter?
Trying to query lead object and retrieve list<leads> with more than 50,000 records 
SELECT Id, Name, Field1, Field2 FROM lead where Status = 'Eligible' ...........
Without using group by clause
I want to get all unique values of Store__c, so that I can use it to querry my store object later (I can't use group by here). My query looks like 
List<lead> listLead = [ SELECT  Store__c FROM Lead WHERE status = 'Eligible'];
Set<lead> random2 = new Set<lead>();
random2.addAll(listLead);
System.debug(random2);
The problem here is I am getting result for random2 as follows. I only want a set which has Store__c and not Id and RecordTypeId for lead
Lead: {Store__c=a0O1F000000R39cUAC, Id=00Q1F000002I6FFUA0, RecordTypeId=0121F000000B25UQAS}, 
Lead:{Store__c=a0O1F000000R4xqUAC, Id=00Q1F000002IBziUAG, RecordTypeId=0121F000000B25UQAS}}
Also, my next question is : how do I use this Set to query the Store__c object to get all unique Regions__c. (How do I iterate the list of stores in soql query) e.g select region__c from Store__c where id=  set of retrieved Store ids in previous query . Also, how efficient would it be?

Thanks
Trying to query lead object and retrieve list<leads> with more than 50,000 records 
SELECT Id, Name, Field1, Field2 FROM lead where Status = 'Eligible' ...........
Without using group by clause
I want to get all unique values of Store__c, so that I can use it to querry my store object later (I can't use group by here). My query looks like 
List<lead> listLead = [ SELECT  Store__c FROM Lead WHERE status = 'Eligible'];
Set<lead> random2 = new Set<lead>();
random2.addAll(listLead);
System.debug(random2);
The problem here is I am getting result for random2 as follows. I only want a set which has Store__c and not Id and RecordTypeId for lead
Lead: {Store__c=a0O1F000000R39cUAC, Id=00Q1F000002I6FFUA0, RecordTypeId=0121F000000B25UQAS}, 
Lead:{Store__c=a0O1F000000R4xqUAC, Id=00Q1F000002IBziUAG, RecordTypeId=0121F000000B25UQAS}}
Also, my next question is : how do I use this Set to query the Store__c object to get all unique Regions__c. (How do I iterate the list of stores in soql query) e.g select region__c from Store__c where id=  set of retrieved Store ids in previous query . Also, how efficient would it be?

Thanks