Apex
CloudFiles Client
Remove from Community
this method allows for the programmatic unsharing of a file or folder from a salesforce record and its associated experience cloud users it removes a cloudfiles resource (file or folder) from being shared with community (portal) users via experience cloud, ensuring the resource is no longer accessible through experience cloud widgets or the related salesforce record before we dive into this article, we assume that you are already familiar with the remove from community docid\ x6bso0o3sv4qqtsyewkan flow action global static void unshareresources( list\<types unshareresourceinput> unshareresourceinputs, string library, string runas ) parameters unshareresourceinputs list of types unshareresourceinput docid\ oz8ppr92sjrpclplefjpq library type of library(example sharepoint ) you can get this value from content library docid\ wtj62wux2a6hgfwvpm4ij runas email id of the user on whom behalf the function should run if you want to run the action as automation user, supply integrationuser return type this functions doesn't return anything example list\<cldfs types unshareresourceinput> unshareresourceinputs = new list\<cldfs types unshareresourceinput> { new cldfs types unshareresourceinput( '01kehakuxvid7nmslzingkuxgq3sit75cm', 'file', '001dl00000wonj3qab' ) }; cldfs client unshareresources(unshareresourceinputs, 'sharepoint', 'integrationuser');