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
Shubham Bansal 45Shubham Bansal 45 

I have a community group but i want to add a custom drop down on my group component ui

I have a community group but I want to add a custom drop down on my group component UI.

Is this possible?
 

Marzorati ClaudioMarzorati Claudio
Hi Shubham,

could you explain better your goal maybe by posting your example code?
For sure it is possible to configure a dropdown for certain user or group in a development, but without other data is difficult to answer you.

For example you can exclude the view of this part of your component thought a backend function. (just example simplified)
 
static Set<String> ALLOWED_USERS = new Set<String>{'USER_1', 'USER_2'};

@AuraEnabled
public class Boolean getVisibility(){
	if(ALLOWED_USERS.contains(UserInfo.getUserId())) {
		return true;
	}
	return false;
}
For real life case consider custom metadata to store info such these to avoid to hardcode data in your code.

Claudio
Shubham Bansal 45Shubham Bansal 45
Hi Claudio, the real-time example for the problem is that in my community I have use group component to create groups and all other stuff like this forum post and chat and in which user can subscribe for getting email notification this features are given bu standard group but in my case when user select the daily notification, then the standard functionality fail so I want to create a custom drop-down  for this functionality and hide the standard drop-down so that  i can ensure user is notified every time and i want to place my custom drop-down at same place where standard drop-down is place.User-added image
Marzorati ClaudioMarzorati Claudio
I think that in this case you have 2 solutions:

1. Use the standard component within limitations
2. Use a complete custom solution for the component

I know that is difficult to do all with custom, but in certain cases it is necessary.
Just a question:
which standard functionality fails during your process? Maybe we can fix this problem.

Claudio
Shubham Bansal 45Shubham Bansal 45
Hi Claudio
when user chooses daily update email notification then it does not work.
 
Marzorati ClaudioMarzorati Claudio
Ok Shubham,

i think that only a custom solution will help you.
So just to summarize all points:

1. CollaborationGroup :- This object represents a Chatter group.
2. CollaborationGroupMember :- This object represent a member of a Chatter group. CollaborationGroupId represent Id of Chatter Group,  MemberId represent ID of the user(group member) and NotificationFrequency represent frequency at which Salesforce sends Chatter group email digests to this members. Possible options for NotificationFrequency are
D—Daily
W—Weekly
N—Never
P—On each post

You can develop a custom interface to set CollaborationGroupId and NotificationFrequency (D in your case) for each user logged in into your community.

If this help you to solve the problem, please mark as best answer
Claudio