• kalyan chandra 9
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
trigger accountnameuppercase on account (before insert,before Update) {
    List<account> acclist = trigger.new;
    nameupper.makeuppercase(acclist);
}

apex class:::

public class accnameuppercase{
    public static void makeuppercase(List<account> acclist){
        for(account a : acclist){
       String rep_name =a.name;
List<String> elems = rep_name.split('');
rep_name = '';
for (String x : elems)
{
    rep_name += x.substring(0,1).toUpperCase()+x.substring(1,x.length() ) + ' ';
}  

   a.name=rep_name;
   
        }
        }
        }
trigger accountnameuppercase on account (before insert,before Update) {
    List<account> acclist = trigger.new;
    nameupper.makeuppercase(acclist);
}

apex class:::

public class accnameuppercase{
    public static void makeuppercase(List<account> acclist){
        for(account a : acclist){
       String rep_name =a.name;
List<String> elems = rep_name.split('');
rep_name = '';
for (String x : elems)
{
    rep_name += x.substring(0,1).toUpperCase()+x.substring(1,x.length() ) + ' ';
}  

   a.name=rep_name;
   
        }
        }
        }
trigger accountnameuppercase on account (before insert,before Update) {
    List<account> acclist = trigger.new;
    nameupper.makeuppercase(acclist);
}

apex class:::

public class accnameuppercase{
    public static void makeuppercase(List<account> acclist){
        for(account a : acclist){
       String rep_name =a.name;
List<String> elems = rep_name.split('');
rep_name = '';
for (String x : elems)
{
    rep_name += x.substring(0,1).toUpperCase()+x.substring(1,x.length() ) + ' ';
}  

   a.name=rep_name;
   
        }
        }
        }