-
Splitting label values on '\n' is not getting same values on comparing
When i am comparing two same values in label by splitting values on the basis of '\n'
It is getting some problem on the last value of the list returned by System.Label.QuoteFCLFix_OriginServices.split('\n')
How can i solve this issue?
for(String c: System.Label.QuoteFCL_OriginServices.split('\n')) {
FCLOriginServices.add(new wrappingServices(c));
}list<wrappingServices> tempWrapList = new list<wrappingServices>();
for(wrappingServices objWrap : FCLOriginServices){
for(String c: System.Label.QuoteFCLFix_OriginServices.split('\n')) {
if(objWrap.label == c ){
objWrap.selected = true;
}
}
tempWrapList.add(objWrap);
}
FCLOriginServices.clear();
FCLOriginServices.addall(tempWrapList);
Log In to reply.
Popular Salesforce Blogs
Salesforce Health Cloud: Going Beyond Patient Records to Build Patient Relationships
Salesforce Health Cloud – In today’s digital era, Healthcare has changed a lot. And these changes are driven by three key factors – Consumer expectations,…
Data Manipulation and Error Handling in Salesforce
In Salesforce, to fetch data using apex we require DML operations. Apex allows DML operations on both List<Sobject> and single sObject to update data in…
Top 5 Scripts you need to Know before Dealing with Visualforce Pages.
1.) Is it Lightning experience OR classic view ? Have you ever faced a problem of identifying in which experience user is opening your page…