You need to sign in to do that
Don't have an account?
salesforcerrr
Only StandardController and Apex Code controllers are currently supported
Hi,
I have build an page component with the following head:
Which i want to be able to use the following Controller extension:
However, the error i am getting:
Only StandardController and Apex Code controllers are currently supported
When I try to insert standarController="Case" in the first line of my componet I get the following error instead:
Unsupported attribute standardcontroller in <apex:component> in ActivityStatement at line 1 column 106
Can somone assist witht this please? Much appreciated.
I have build an page component with the following head:
<apex:component layout="none" access="global" extensions="CaseImageController"> <apex:attribute name="case" description="The Service Activity Statement." type="Case" />
Which i want to be able to use the following Controller extension:
Public Class CaseImageController { String recId; public CaseImageController (ApexPages.StandardController controller) { recId = controller.getId(); } public String getFileId() { String fileId = ''; List<Attachment> attachedFiles = [select Id from Attachment where parentId =:recId order By LastModifiedDate DESC limit 1]; if( attachedFiles != null && attachedFiles.size() > 0 ) { fileId = attachedFiles[0].Id; } return fileId; } }
However, the error i am getting:
Only StandardController and Apex Code controllers are currently supported
When I try to insert standarController="Case" in the first line of my componet I get the following error instead:
Unsupported attribute standardcontroller in <apex:component> in ActivityStatement at line 1 column 106
Can somone assist witht this please? Much appreciated.
<apex:component layout="none" access="global" controller="CaseImageController">
<apex:attribute name="recId" assignTo="{!recId}"/>
Public Class CaseImageController {
String recId{get;set;}
public CaseImageController () {
}
public String getFileId() {
String fileId = '';
List<Attachment> attachedFiles = [select Id from Attachment where parentId =:recId order By LastModifiedDate DESC limit 1];
if( attachedFiles != null && attachedFiles.size() > 0 ) {
fileId = attachedFiles[0].Id;
}
return fileId;
}
}
Regards,
Pawan Kumar
<apex:attribute name="recId1" assignTo="{!recId}" description="The Service Activity Statement." type="String" />