Get only Id's from apex using salesforce

string ss = '01:a3E800000004XcbEAE,02:a3E800000004XjbEAE,03:a3E800000004XbtEAE,04:a3E34000000neY2EAI,05:a3E800000004XS9EAM';
List < String > strNewValue = new List < String > (ss.split(','));
string s ='';
list<string> st = new list<string>();
for (String optionName: strNewValue) {
s = s + '\''+optionName.subString(optionName.indexOf(':')+1)+'\''+',';
st.add(optionName.subString(optionName.indexOf(':')+1));
}
system.debug(s);

No comments:

Featured

What is Cryptography in salesforce and what are all the algorithms provided by them ?

A). It is a security protocal between two systems. Lets say we are integration two systems without any encrytion mechanism then hackers wil...

Popular