• saikrishna rangineni
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
This is my Class


public class AccountHandler {
public static Account insertNewAccount(String name,INTEGER Phn) {
Account a = new Account();
a.Name = name;
a.phone = 'Phn';    
try
{
insert a;
} catch (Exception e) {
return null;
}
return a;
}
}



Calling from Execute Anonymous

AccountHandler.insertNewAccount('RKNN',12345);



In Account record page iam getting Phone field value as Phn . Instead of 12345 , which i had passed in method. How to get phone field value as 12345 as passed in execute anonymous block.
 
This is my Class


public class AccountHandler {
public static Account insertNewAccount(String name,INTEGER Phn) {
Account a = new Account();
a.Name = name;
a.phone = 'Phn';    
try
{
insert a;
} catch (Exception e) {
return null;
}
return a;
}
}



Calling from Execute Anonymous

AccountHandler.insertNewAccount('RKNN',12345);



In Account record page iam getting Phone field value as Phn . Instead of 12345 , which i had passed in method. How to get phone field value as 12345 as passed in execute anonymous block.