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
Tarun Kaushik 11Tarun Kaushik 11 

Unable to put validation on deletion of article type

HI

I want to put a check on article type, If article is linked to a Case then it should not allow  the only  "archived" to be deleted but user can delete article in "draft"
How can I achieve it.?
 
Matt SmelserMatt Smelser
Tarun-
You can create a trigger to handle this. If you have never created a trigger I would recommend looking into this trailhead https://trailhead.salesforce.com/module/apex_triggers
SalesFORCE_enFORCErSalesFORCE_enFORCEr
I don't think it is possible. Both Article Type and CaseArticle objects are not triggerable.
Tarun Kaushik 11Tarun Kaushik 11
Hi Shalabh

Yes, We cannot create a trigger on any article type.
Is their any wat to call process builder when any article type is deleted.
Thanks
SalesFORCE_enFORCErSalesFORCE_enFORCEr
No. Process builders are same as workflows, they can trigger only on Save.
Matt SmelserMatt Smelser
Instead of allowing user to delete articles create a status that the user can set and then an admin can clean the data at a later date.