TO_BLOB

Description

Converts a string (String) into an Apex Blob type. If the input cannot be converted, the function throws an error.

Syntax

TO_BLOB(string) -> Blob

Parameters

ParameterData TypeRequiredDescription
stringStringYesThe string to convert into a Blob.

Example

TO_BLOB(Document_Content__c)
-- Converts Document_Content__c into a Blob.