function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Max_gMax_g 

Controller extension error

Having an issue with this extension code giving me:

 Save error: Invalid type: ApexPages.StandardController LACCtrlExtension.cls /natenv.sandbox/src/classes line 4 Force.com save problem

 

Here is the code.

public with sharing class LACCtrlExtension {

public Task task {get; set;}

 

public LACCtrlExtension(ApexPages.StandardController controller) {

           

this.task = (Task)controller.getRecord();

           

this.task.whatId = ApexPages.currentPage().getParameters().get('what_id');   

           

this.task.subject = ApexPages.currentPage().getParameters().get('tsk5');

           

this.task.type = 'Call';

           

this.task.status = 'Completed';

           

this.task.activitydate = Date.today();

    }

 

}

Best Answer chosen by Admin (Salesforce Developers) 
crop1645crop1645

Weird -- works for me -- I copy-pasted your code into Winter 13 sandbox and it saved no issue

All Answers

crop1645crop1645

Weird -- works for me -- I copy-pasted your code into Winter 13 sandbox and it saved no issue

This was selected as the best answer
Max_gMax_g

Finally got mine to accept.  Don't know what it was causing the problem.