0

We are facing issue when we create Attachment record in Apex, using the data that we get from Rest Api from another instance. Tried with Blob.ValueOf(responsebody), EncodingUtil.base64decode(responsebody), where as response body is in string.

Please suggest. Thank you in advance.

Shrivaths

  • Please post your complete code and the errors (if any) – Gaurav Kheterpal Mar 4 '15 at 13:47
  • Hi Gaurav, Thank you for showing interest. This issue has been resolved by making use of getBodyasBlob() method. As I was trying to get the data in string first and then I was trying to convert to blob and insert the attachment. Now its working fine, but wondering wahts the limit if we use getBodyasBlob(), is there any limitation? Or is there any other solution for that? Thanks, Shrivaths – Shrivaths Kulkarni Mar 9 '15 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.