• Sahil Sharma 36
  • NEWBIE
  • 3 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
List<Account> accList = new List<Account>();
        accList.add(new Account(name = 'ss'));
   
        List<SObject> sObjectList = accList;
        accList = sObjectList;    
        
                        or
        
        List<Account> aList = new List<SObject>();
Hi,
My requirement was to redirect my page after the record gets saved without using VF page,
I am using Case object here. I need to send an agreement using custsom url, So Here What I needed is to redirect to the custom url when the records gets submitted. Please assist me.
 
List<Account> accList = new List<Account>();
        accList.add(new Account(name = 'ss'));
   
        List<SObject> sObjectList = accList;
        accList = sObjectList;    
        
                        or
        
        List<Account> aList = new List<SObject>();
I have a String and I'm trying to get it's characters by index.

For some reason the method string.charAt(index) , doesn't return a letter, but a number..

Any idea how can I get the characters ?
How do I throw an exception? The developers guide helpfully tells me to use the throw statement and provide it with an exception object but then unhelpfully provides the following example:
 
throw <exceptionObject>;
 
I tried:
 
throw new Exception('error message');
 
but get the error - type cannot be constructed: Exception.
 
I did find something that said I could not construct any of the system exceptions so then what excepetion object can I provide to the throw statement?