array length in Salesforce
Asked Answered
G

1

8

I'm getting this error from the line of code below:

Error: AddIMRConroller Compile Error: Initial term of field expression must be a concrete SObject: LIST at line 21 column 23

string[] str1 = imrTable.split('\r\n');
    System.debug( str1.length); 
Gastritis answered 4/8, 2013 at 12:52 Comment(0)
G
22

In Salesforce we need to use size() method instead of the length property. This is something different then Java.

Gastritis answered 4/8, 2013 at 13:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.