Using a SubStringBefore(' ') and SubStringAfter(' ')
SubStringBefore(' ') and SubStringAfter(' ')
Simple displaying of the firstName and lastName of an account object using Apex in Salesforce. Using a SubStringBefore(' ') and SubStringAfter(' ') .
Apex code :
list<account> a = [select id,name from account limit 10];
for(account aa : a){
system.debug('firstName : '+ aa.name.SubStringBefore(' '));
system.debug('LastName : '+ aa.name.SubStringAfter(' '));
}
We need your support,Please share/Like us on Facebook ⛅
Simple displaying of the firstName and lastName of an account object using Apex in Salesforce. Using a SubStringBefore(' ') and SubStringAfter(' ') .
Apex code :
list<account> a = [select id,name from account limit 10];
for(account aa : a){
system.debug('firstName : '+ aa.name.SubStringBefore(' '));
system.debug('LastName : '+ aa.name.SubStringAfter(' '));
}
We need your support,Please share/Like us on Facebook ⛅
Using a SubStringBefore(' ') and SubStringAfter(' ')
Reviewed by dasfrogpractice
on
01:29
Rating:
No comments: