Method nameThe Archbee page is titled Share With Community User, but the underlying Apex method is
shareResources(). Call it as cldfs.Client.shareResources(...).Signature
global static List<Attachment> shareResources( List<Types.ShareResourceInput> shareResourceInputs, String library, String runAs )
Parameters
| Parameter | Description | |
|---|---|---|
shareResourceInputsList<Types.ShareResourceInput> |
required | List of Types.ShareResourceInput entries, one per resource to share. |
libraryString |
required | Type of library (example - sharepoint). You can get this value from the Content Library. |
runAsString |
optional | runAs — usually a static value, integrationUser. |
Return Type
List<Attachment>
Example
List<cldfs.Types.ShareResourceInput> shareResourceInputs = new List<cldfs.Types.ShareResourceInput> { new cldfs.Types.ShareResourceInput( '01KEHAKUXVID7NMSLZINGKUXGQ3SIT75CM', 'file', '001dL00000Wonj3QAB', 'b!nJBtPq_z5UeJtFrj_f24XEQqlPUD8vtFsg7GBcrXJepiUn9bkb_7QbDPtqHVD-cP' ) }; List<cldfs.Attachment> attachments = cldfs.Client.shareResources( shareResourceInputs, 'sharepoint', 'integrationUser' );