You need to sign in to do that
Don't have an account?
Darth Plagueis
method does not exist / incorrect signature
Hey Everyone... any help is greatly appreciated. Finally reaching out as I can not see what the heck I am doing wrong here.
I am just trying to grab string data from the request URL - code originally worked fine without the encodingutil class on simple reports - however as reports got more complex with special characters I would recieve the BLOB is not a valid UTF-8 format - so I introduced the base64string and now I am receiving this error.
Help before dreamforce recieve an extra special prize!
Thanks everyone!
Justin
public class CSVexport {
public static Boolean isTest;
public static String strEmailAddr;
public static String strOut;
public static Boolean restRequested;
public String strEmail{get;set;}
public String strRptname{get;set;}
public static base64string;
void CSVexport () {
strOut = '';
}
public String getCSVexport() {
restRequested = System.isFuture() || System.isScheduled();
executeRpt();
return strOut;
}
public void executeRpt() {
String requestURL;
requestURL = '/' + strRptname + '?csv=1&exp=1';
strOut = new PageReference(requestURL).getContent().toString();
base64string = EncodingUtil.base64Encode(base64string);
System.debug('CALLING executeRpt: output= ' + strOut );
}
}
I am just trying to grab string data from the request URL - code originally worked fine without the encodingutil class on simple reports - however as reports got more complex with special characters I would recieve the BLOB is not a valid UTF-8 format - so I introduced the base64string and now I am receiving this error.
Help before dreamforce recieve an extra special prize!
Thanks everyone!
Justin
public class CSVexport {
public static Boolean isTest;
public static String strEmailAddr;
public static String strOut;
public static Boolean restRequested;
public String strEmail{get;set;}
public String strRptname{get;set;}
public static base64string;
void CSVexport () {
strOut = '';
}
public String getCSVexport() {
restRequested = System.isFuture() || System.isScheduled();
executeRpt();
return strOut;
}
public void executeRpt() {
String requestURL;
requestURL = '/' + strRptname + '?csv=1&exp=1';
strOut = new PageReference(requestURL).getContent().toString();
base64string = EncodingUtil.base64Encode(base64string);
System.debug('CALLING executeRpt: output= ' + strOut );
}
}
Is this supposed to be a constructor?
If so, you'll need to change it to:
1. I think James is right.
your contructor's return type is "void" which is not possible.and Hence the error.
Constructor can never have return types.
it should be " public CSVexport(){ . . . }
2. if you are done with constructor and still get an error.
Please provide some more info about
"base64string = EncodingUtil.base64Encode(base64string);"
I think you should check parameter you are passing to "base64Encode" method