Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

array length in Salesforce

I'm getting error "Error Error: AddIMRConroller Compile Error: Initial term of field expression must be a concrete SObject: LIST at line 21 column 23" from below line of code .

string[] str1 = imrTable.split('\r\n'); System.debug( str1.length);

like image 251
Raj Avatar asked Aug 04 '13 12:08

Raj


1 Answers

In salesforce , we need to use size() method instead of length . this is something different then Java :(

like image 79
Raj Avatar answered Sep 19 '22 13:09

Raj