I am in one of the requirements where I need to set IsArchived = true
when user uploading any files using Upload files option.
I thought apex trigger will work here but it doesn't
trigger setFileArchived on ContentDocument (before insert) {
for(ContentDocument ct : trigger.new){
system.debug('---->'+ct.isArchived);
ct.isArchived = true;
}
}
Can anyone help me to find a way?