Salesforce Free Developer >

Chapter 2 - Apex Datatypes and Operators >

ID & Blob Datatypes in APEX

ID & Blob Datatypes in APEX

ID:

Any valid ID (18-character force.com identifier). If you set ID to a 15-character value then apex converts its value to its 18-character representation.

Note: All invalid ID values are rejected with a runtime exception.

Blob:

A collection of binary data stored as a single object.

A blob is typically used to store images, audio or other multimedia objects and sometimes binary executable code is also stored as a blob. We can convert this datatype to string or from string using the toString() and valueOf() methods.

Ex: String s = ‘abc’;

Blob b = Blob.valueOf(s);

String s1 = b.toString();

Download Study Material

Get access to exclusive study material for Salesforce Certification and ace your exams!

Our Salesforce Certification Courses

Hey there! Glad you made it through our Salesforce Developer Training for beginners. But wait! We've got some high-in-demand Salesforce courses for you to take your Salesforce skills to the next level, making you a desired professional in the Salesforce job market.

Post a Comment

Your email address will not be published. Required fields are marked *