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
IrpIrp 

method does not exist or incorrect signature

Hi, I am new to apex developpement

I get this message not sure I am allowed to do that but i need to create a list of lists to create dynamics columns

Thanks

 

public with sharing class modut3 {

 

public Class BoxItem{
....
}
}

public Class LineBoxItems{
public integer row {get;set;}
public string rowLabel {get;set;}
public list<boxItem> lRowBoxIt {get;set;}

public LineBoxItems(
integer r,
string rl ,
list<BoxItem>lb
) {
row=r;
rowLabel=rl;
lRowBoxIt=lb;
}
}

 


LBItems = new list<LineBoxItems>();
list <BoxItem> rowBoxItems = new list<BoxItem> ();

rowBoxItems.add(new BoxItem(r,c,...));

LBItems.add(r,'s', rowBoxItems);


i can not compile and get

Save error: Method does not exist or incorrect signature: [LIST<modut3.LineBoxItems>].add(Integer, String,
LIST<modut3.BoxItem>)

Best Answer chosen by Admin (Salesforce Developers) 
SLockardSLockard

Try doing :

LBItems.add(new LineBoxItems(r, 's', rowBoxItems));

 

All Answers

SLockardSLockard

Try doing :

LBItems.add(new LineBoxItems(r, 's', rowBoxItems));

 

This was selected as the best answer
IrpIrp
Thanks it compiles...