You need to sign in to do that
Don't have an account?
Paul Bachmann
Getting Token Error on my Controller
Getting this error [Error] Error: Compile Error: unexpected token: 'ApexPages.StandardController' at line 3 column 37
I'm trying to add the ApexPages so I can add this VF page via page layout editor.
Thanks, Paul
public with sharing class CapturePSignatureController {
public CapturePSidnature Controller {ApexPages.StandardController} {
@RemoteAction
global static String savePSignature(String imageUrl, String accountId) {
try {
Attachment accSign = new Attachment();
accSign.ParentID = accountId;
accSign.Body = EncodingUtil.base64Decode(imageUrl);
accSign.contentType = 'image/png';
accSign.Name = 'Patient Signature Image';
accSign.OwnerId = UserInfo.getUserId();
insert accSign;
return 'success';
}catch(Exception e){
system.debug('---------- ' + e.getMessage());
return JSON.serialize(e.getMessage());
}
return null;
}
}
I'm trying to add the ApexPages so I can add this VF page via page layout editor.
Thanks, Paul
public with sharing class CapturePSignatureController {
public CapturePSidnature Controller {ApexPages.StandardController} {
@RemoteAction
global static String savePSignature(String imageUrl, String accountId) {
try {
Attachment accSign = new Attachment();
accSign.ParentID = accountId;
accSign.Body = EncodingUtil.base64Decode(imageUrl);
accSign.contentType = 'image/png';
accSign.Name = 'Patient Signature Image';
accSign.OwnerId = UserInfo.getUserId();
insert accSign;
return 'success';
}catch(Exception e){
system.debug('---------- ' + e.getMessage());
return JSON.serialize(e.getMessage());
}
return null;
}
}
Couple of problems with this line: Sidnature should be Signature, curly brackets should be parentheses around the ApexPages parameter.
public CapturePSidnature Controller {ApexPages.StandardController} {
Let me know how that works for you.
Steve
[Error] Error: Compile Error: unexpected token: ')' at line 3 column 69
Thanks for the quick response
This is a parameter declaration right? So needs a parameter name, not just the type.
Then are you going to use that parameter? Do you need a parameter if you are not using it?
Steve
I am close to having it work, as I can make it all happen in "preview" mode. Problem is it's a hodge podge of code I've found and I guess my controller needs some work to enable the VF page to be seen/added via standard page editor in SFDC, hence the ApexPages.StandardController problem I'm having since I realized that is why I was not seeing my VF Page through the page editor.
Here is my current controller Here is my current VF Page Code
instead of controller="CapturePSignatureController" in your page, define it with the standard controller syntax. Your controller class can still be accessed as it is fully qualified. standardController="Account" then it will show up in the Account page layout. But I thought you said you wanted it to appear on the case?
Steve