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
LavanyaLavanya 

How to coverting lower case to uppercase text while uploading a csv file.

Hi All,

 

       I have wirtten a apex code and Vf page for uplaoding a csv file to create a new Account, Contact. In my file the account is given in lower case letter, i need to change it to upper case letter and then  need to save in to salesforce. I tried  but can't get solution for this. Kindly any tell how to resolve this and also tell me any links for this. Here i have attached the code also. Thanks in advance

 

Code:

 

for (Integer i=1;i<filelines.size();i++)
{
String[] inputvalues = new String[]{};
inputvalues = filelines[i].split(',');
String SalesforceAccountNumber = inputvalues[2];
Acc_Bulider = inputvalues[3];
if(Acc_Bulider != 'Builder Unknown')
{

Account a = new Account();
a.Name = inputvalues[3];

acctNames.add(a.Name);
  accstoupload.add(a);
}

}

 

Best Answer chosen by Admin (Salesforce Developers) 
LavanyaLavanya

We can use toUpperCase()  ?

 

a.Name = inputvalues[3].toUpperCasee();

All Answers

Yoganand GadekarYoganand Gadekar

Youc an use this method:

string newupperstring = myString1.toUpperCase();

 

hit kudos and mark this as answer if it helps you out

LavanyaLavanya

We can use toUpperCase()  ?

 

a.Name = inputvalues[3].toUpperCasee();

This was selected as the best answer