• Anu Maniappan
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies
Hi all,

I have a requirement to send an email to all the members of the ContentWorkspaces to which a ContentDocument belongs. I have got the list of Content workspaces to which that document belongs. But how can I get the list of members of those workspaces in Apex code? Any suggestions please?

(Note : From a post a few months back, I read that there is no object exposed with the ContentWorkspace Member details.

https://developer.salesforce.com/forums/?id=906F0000000AuqjIAC

Would like to know whether it is not available still. I don't need the details regarding the permissions for that document. I just need the members of the Content Workspaces.)
Hi All,

I'm trying to display all the files of all the Groups to which a user belongs to.

i.e, if the user is a member of GroupA and GroupB, then I have to display all the files which belong to GroupA and all the files which belong to GroupB.

This is similar to 'FILES IN MY GROUPS' section in the standard Files tab.

Currently I am trying to use the 'ContentDocumentLink' object as shown below:
select Id,ContentDocument.title,ContentDocument.LastViewedDate,ContentDocumentId,ContentDocument.LastModifiedDate from ContentDocumentLink where LinkedEntityId =:groupId

Using the above query I can get all the files which belong to the group referred by the groupId variable.
When I try to query by giving a set of ids for 'LinkedEntityId' field in the where condition, then I'm getting an error saying that only a single id, ContentDocumentid or LinkedEntityId should be used with an equals operator.

Is there any other object that can be used for this? Or should the above query be changed?
So how can I get a list of documents which belong to a list of groups?
Need some help on this please.

Thanks,
Anu
 
Hi All,

I am trying to stop the default email notifications for a particular User in salesforce through apex code.
Stopping default email notifications can be done manually by going to My Settings -> Email Settings and unchecking 'Receive emails' checkbox.
I need to achieve the same thing through Apex code. Please suggest how can this be done?

Thanks,
Anu
 
Hi All,

I'm trying to display all the files of all the Groups to which a user belongs to.

i.e, if the user is a member of GroupA and GroupB, then I have to display all the files which belong to GroupA and all the files which belong to GroupB.

This is similar to 'FILES IN MY GROUPS' section in the standard Files tab.

Currently I am trying to use the 'ContentDocumentLink' object as shown below:
select Id,ContentDocument.title,ContentDocument.LastViewedDate,ContentDocumentId,ContentDocument.LastModifiedDate from ContentDocumentLink where LinkedEntityId =:groupId

Using the above query I can get all the files which belong to the group referred by the groupId variable.
When I try to query by giving a set of ids for 'LinkedEntityId' field in the where condition, then I'm getting an error saying that only a single id, ContentDocumentid or LinkedEntityId should be used with an equals operator.

Is there any other object that can be used for this? Or should the above query be changed?
So how can I get a list of documents which belong to a list of groups?
Need some help on this please.

Thanks,
Anu
 
Hi All,

I am trying to stop the default email notifications for a particular User in salesforce through apex code.
Stopping default email notifications can be done manually by going to My Settings -> Email Settings and unchecking 'Receive emails' checkbox.
I need to achieve the same thing through Apex code. Please suggest how can this be done?

Thanks,
Anu