function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Apex developer 21Apex developer 21 

accounthierarchy unexpected token: ')'

I get the following error: accounthierarchy  unexpected token: ')'    my code looks like:
List<SObject> results = [SELECT ID FROM Account];
  Set<Id> resultIds = (new Map<Id, SObject>(results)).keySet();  
  Map<Set<Id>,results>  getquick = getHierarchies.getAccountHierarchiesQuick(Set<Id>result);
The class tha i am calling is named:  getHierarchies and looks like:
public static Map<Id,HierarchyNode> getAccountHierarchiesQuick(Set<Id> top_acct_ids) {
    Map<Id,HierarchyNode> nodes = new Map<Id,HierarchyNode>();
    Set<Id> parent_acc_ids = top_acct_ids;
Wat am i doing wrong?
 
Best Answer chosen by Apex developer 21
Arshadulla.ShariffArshadulla.Shariff
Hello Mr Apex,

Try changing your code with following .
Map<Set<Id>,results>  getquick = getHierarchies.getAccountHierarchiesQuick(result);

I hope this helps,if its please mark it solved .

Thanks