【Salesforce】Ending position out of bounds: 3
【Salesforce】Ending position out of bounds: 3
例:
String
areaCodeA
=
phone.substring(
0
,
3
);
エラー:
Ending position out of bounds: 3
対策:
if(phone.Length()>=3
){
String
areaCodeA
=
phone.substring(
0
,
3
);
}
参考URL
https://developer.salesforce.com/forums/?id=906F0000000kAICIA2