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
deepak kumawatdeepak kumawat 

Regarding to StringException

When i run the tesst method then i got the this error , how to reeslove this any idea ?? 

System.StringException: Unrecognized base64 character: !
Amit Chaudhary 8Amit Chaudhary 8
Please check below post. I hope that will help you
1) https://developer.salesforce.com/forums/?id=906F0000000943fIAA
2) http://salesforce.stackexchange.com/questions/81576/convert-byte-array-jsonarray-to-base-64-string-via-apex
3) http://www.convertstring.com/EncodeDecode/Base64Encode
Blob keyval = EncodingUtil.base64Decode(keyString);
Blob ivval = EncodingUtil.base64Decode(IvString);
 
suresh sanneboina 4suresh sanneboina 4
hi Please try this in Developer console
 
string before = '!';
Blob beforeblob = Blob.valueOf(before);
string paramvalue = EncodingUtil.base64Encode(beforeblob);
System.debug(before + ' is now encoded as: ' + paramvalue);
Blob afterblob = EncodingUtil.base64Decode(paramvalue);
System.debug(paramvalue + 'is now decoded as: ' + afterblob.toString());