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
JosephTJosephT 

Checkbox Trigger for Related CRM Content

I would like to write a simple trigger to flag a checkbox on the lead record if the lead has any related CRM Content.  But, what object would I build the trigger off of?
ManojjenaManojjena
Hi Joseph,

You can write trigger in ContentDocument .To write trigger in ContentDocument  you need to go to Console >New >ApexTrigger >select Contentdocument .

And check the relationship with Lead and write  logic accordingly .
for more detail about CMS objects please follow below links .

https://www.salesforce.com/developer/docs/api/Content/sforce_api_erd_content.htm#sforce_api_erd_content

Thanks
Manoj