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
Ryan GreeneRyan Greene 

Strange Blob value

Hello,
I created an Apex Trigger to create a Note in the ContentNote upon creation of the record, and the trigger works great and copies the information perfectly with no strange value. Partial code for the Trigger:
for(Lead lds : Trigger.new){
        ContentNote cnt = new ContentNote();
        cnt.Content = Blob.valueof(lds.Sales_Notes__c);
        cnt.Title = 'Creation Note';
Now I created another code to transfer existing "Sales Notes" to the ContentNote. This is an Apex Class and works off a VF button. It also transfers the note and displays the text in the "Text Preview" appropriately, but when the ContentNote is opened it displays Korean/Chineese sysmbols. WHAT IS GOING ON?? Screenshots and Apex Class code below:
TextPreview WorksWHAT?!?!
 
for(Lead lds : lead){
            ContentNote cnt = new ContentNote();
            cnt.Content = Blob.valueof(lds.Sales_Notes__c);
            cnt.Title = 'Creation Note';

 
Raj VakatiRaj Vakati
Can you please check Sales_Notes__c is having any special characters?  that might cause issues.