Apex
...
Input & Output Types
Types.ShareResourceInput
this custom apex type represents the input for the share with community user docid\ zognbkhddt mdpaxjaa6d method global shareresourceinput( string resourceid, string resourcetype, string recordid, string driveid ) class params/properties resourceid input the resource id i e unique identifier of the file or folder being shared this id is used to locate and process the resource within the specified library and drive resourcetype specfies whether the target is a file or folder recordid specifies the target recipient of the shared resource this field can be populated with the user id of the user we want to share the target file or folder it can also be populated with a salesforce record id to share it with multiple users related to that record this can be a salesforce record id to associate the file or folder with a record (such as an account or opportunity) and share it with all the users having record access a user id to share the resource directly with an individual user a group id to share with a predefined group of users in salesforce driveid indicates the id of the drive in which the target file or folder resides this is essential for external storage systems like google drive or sharepoint, where files are stored across multiple drives