You need to sign in to do that
Don't have an account?
NikolaM
How do I get an account lookup and then save the account in DB on a visualforce page?
I have a custom object and I have created a lookup through a button using a visual force page on that object but I could not save the account record in DB, how do I do that?
public with sharing class Lookup {
public Account t{get;set;}
public Lookup ()
{
t =new Account();
String tId = ApexPages.currentPage().getParameters(). get(‘id’);
t = [Select name From Account Where Id =:tId];
}
public pagereference save(){
insert t;
return null;
}
}
public with sharing class Lookup {
public Account t{get;set;}
public Lookup ()
{
t =new Account();
String tId = ApexPages.currentPage().getParameters(). get(‘id’);
t = [Select name From Account Where Id =:tId];
}
public pagereference save(){
insert t;
return null;
}
}