How can I convert a String of that type :
123, 456, 789
List<String> ? So I can access to the value 123 for example.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Use split method. this method will split the string using provided regex.
String str = '123, 456, 789'; List<String> lstString = str.split(','); System.debug('-----lstString----'+lstString);