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
VenkatVenkat 

Copy ContentNote content field to Case Description field

Hi All,

I want copy ContentNote Content to Case Description field. Here, Description is Text Area data type and Content filed data type is base64.

Problem: How can I copy Content field to Description field with images and text as it is?

When I am using trigger on ContentDocumentLink able to get the fields, but not able to copy as expected format. Some different value is coming when I did copy in trigger.

Thanks in Advance! :)

Regards
Venkat.
SalesFORCE_enFORCErSalesFORCE_enFORCEr
You can't add images or similar content to Case Description field, you need to create a custom Description field of type rich text.
VenkatVenkat
Hi Shalab,

Thank You! for your response. Yes, we cant copy images or similar content to case description field. But I want copy the text only without any images. Is it possible to do that. For example if I had "Some Sample Text <<Imag>>" then needs to copy only "Some Sample Text" to Case description field.

Thanks
Venkat.
SalesFORCE_enFORCErSalesFORCE_enFORCEr
Then you need to remove all html from the content before copying it to the Description field.
Just use a regex like ('<[^>]+>') and do string.replaceAll
Austin Lewis 12Austin Lewis 12
Hello , I am working on using a trigger on the ContentDocument and a flow to be able to get to the relevent Content Note but am having trouble getting the ContentNote Content over to a variable in my flow. Can you help me?