You need to sign in to do that
Don't have an account?

Getting ownerid on a VF page
I am overriding the Log a Call button on activity history to a VF page. I am not getting the ownerid to set the default. What parameter can I access to generate this?
Here is the code for my VF controller extension:
public withsharingclass LACCtrlExtension {
publicTask task {get; set;}
Public string newname = Apexpages.currentpage().getparameters().get('id2');
public LACCtrlExtension(apexPages.StandardController controller){
this.task = (Task)controller.getRecord();
system.debug('Task Record is = ' + this.task);
this.task.subject = ApexPages.currentPage().getParameters().get('tsk5');
task.Ownerid = newname;
this.task.type = 'Call';
this.task.status = 'Completed';
this.task.activitydate = Date.today();
this.task.whoid = Null;
system.debug('Current Page = ' + ApexPAges.currentPage());
system.debug('WhatId = ' + task.whatId);
system.debug('Subject = ' + task.Subject);
system.debug('Assigned to = ' + task.OwnerId);
}
}