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
Ankit BobdeAnkit Bobde 

How to get comma seperated ids from Text Area Field(Custom settings) to store into the list as single-single item of list

Hello,
I have a Text Area Field in  one of my custom Settings.
I want to pass some id's (say 10) into the TEXT AREA FIELD comma seperated and after that I want to get those id's into a single list so that I can iterate over it and Assign users using that ids.
Any help would be appreciated
Best Answer chosen by Ankit Bobde
KaranrajKaranraj
Ankit - Try the below sample code which split the comma sperated email address string into the list value
String emailStrings = 'karanraj@test.com,Karanraj1@test.com,test@test.com,Testing@abc.com';
List<String> emailList = emailStrings.split(',');
System.debug('Stringggg'+ emailList [0]);

 

All Answers

KaranrajKaranraj
Ankit - Try the below sample code which split the comma sperated email address string into the list value
String emailStrings = 'karanraj@test.com,Karanraj1@test.com,test@test.com,Testing@abc.com';
List<String> emailList = emailStrings.split(',');
System.debug('Stringggg'+ emailList [0]);

 
This was selected as the best answer
Ankit BobdeAnkit Bobde
Hi Karanraj,
Thanks for your instant reply.you suggestion absolutely worked fine,Thank you once again.
Regards,
Ankit