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
DJ 367DJ 367 

void valueOf(List<String>) from the type Blob at line 102 column 67

Hello All,

While I am encoding string it works file but while I am encidung list of string it throwing above error. Any suggestions? thanks
 
String bodyEncoded = EncodingUtil.base64Encode(Blob.valueOf(StrBody));
       (this is working fine)

        List<string> bodyEncoded = EncodingUtil.base64Encode(Blob.valueOf(lstStrBody));
       (This is throwing error)

 
Best Answer chosen by DJ 367
DJ 367DJ 367
Hi,
I resolved using this code.
 
string allstring = string.join(StrBody,'');

string bodyEncoded = EncodingUtil.base64Encode(Blob.valueOf(allstring ));