• Praveen Jha
  • NEWBIE
  • 55 Points
  • Member since 2013
  • Salesforce Consultant
  • Persistent System


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 35
    Replies
I have  2 new fields on a User record in sandbox: -          
Notify_me_of_alerts__c -          
Notify_me_of_releases__c  
Once this is moved to Production, I will want to ensure that all users are opted in (i.e. the values are set to TRUE).   There are triggers associated with these two fields that if changed will add and remove the users from Public Groups. The user may exist in more than one Public Group, depending on the related Products for the Assets of the User’s Contact Account.  
  If I have a batch job that goes through all the Users and updates their records to set the two flags to TRUE, this will kick off the Trigger and populate the groups. Is there a danger of overloading Salesforce if this happens?   We have around 1000 users, so this would fire off 1000 instances of the trigger.     If this is likely to be an issue. Please suggest me on this.
There are so many article type i have created like "Release info", "General". Is it possible to Display that article type  in article column view . 
There are any limits to the numbers of members of a Public Group??
When I add attachment on case, case status should change from new to working. How can i do this??
One of my case has 45 public and 75 private comment . Can we write a visulforce page to display all public comment on that case. We just want to display public comment  not private. 
how can we  import the documents from other places and import them into SF 
We want the users to be able to manage the subscriptions to the alerts themselves. I think the best option is to have a couple of checkboxes in the Portal UI which map to the corresponding checkboxes in the User record.

There are a couple of ways we could do this:

1)      Add the checkboxes to the Email Settings page (which has “Choose to receive  Community emails so user don’t miss important updates”.

2)      Add a new “Notifications” table to the portal (e.g. Home, Cases, Subscriptions,Notifications, Contacts, Accounts, Reports.
Please assist by pointing me in the right direction, I’d appreciate it.
In case there is many public/private comment. Is there any way to filtering  so that user can see public/private comment separately. 
I have one custom field "Notify me on new release" on user object whose data type is checkbox. I have added user to public group  based on role e.g. "Partner community manager"  . There are 50 users belongs to  "partner community manager" and i want to remove any one user from the group when i deselect "notify me on new relese " checkbox field in user detail page. .Right now i can add or remove  user to public group "alert" through below code. 

trigger AddingtoAlertPublicgroup on User (after insert,after Update) {
   List<GroupMember> grpMemlist = new List<GroupMember>();
    Set<Id> userIdsToProcess = new Set<Id>();
    Set<Id> usersToBeRemoved = new Set<Id>();
    Id alertGroupId;
    for(User Usr : Trigger.New){
        if(trigger.isInsert){
            if(Usr.Notify_me_of_releases__c){
               userIdsToProcess.add(Usr.Id); 
            }
        }
        if(trigger.isUpdate){
            if(Usr.Notify_me_of_releases__c && !trigger.oldMap.get(Usr.Id).Notify_me_of_releases__c){
                userIdsToProcess.add(Usr.Id);
            }
            if(!Usr.Notify_me_of_releases__c && trigger.oldMap.get(Usr.Id).Notify_me_of_releases__c){
                usersToBeRemoved.add(Usr.Id);
            }
        }
    }
    
    if(!userIdsToProcess.isEmpty() || !usersToBeRemoved.isEmpty()){
       List<Group> alertGroup = [SELECT Id FROM Group Where DeveloperName='Alert' LIMIT 1];
       if(!alertGroup.isEmpty()){
          alertGroupId =  alertGroup[0].Id;
       }      
    }
    for(User Usr : Trigger.New) {
        if(Usr.Notify_me_of_releases__c && userIdsToProcess.contains(Usr.Id) && alertGroupId != null) {
            GroupMember gm = new GroupMember();
            gm.GroupId = alertGroupId;
            gm.UserOrGroupId = Usr.Id;
            grpMemlist.add(gm);         
        }
    }
    if(!usersToBeRemoved.isEmpty() && alertGroupId != null){
        List<GroupMember> grpMemToBeDeleted = [SELECT Id FROM GroupMember WHERE GroupId = :alertGroupId AND UserOrGroupId IN :usersToBeRemoved];
        if(!grpMemToBeDeleted.isEmpty()){
            delete grpMemToBeDeleted;
        }
    }
    
    if(!grpMemlist.isEmpty()) {
        insert grpMemlist;
    }

}
I have one custom field on user object like "Notify me of releases" which data type is checkbox . When user select "Notify me of releases" checkbox checked  user will get notification for every update of  article whose type is alert. 
Note:- I have created one article type alert.
I have created some article whose type is General. Once we create and publish article, email notification goes to the specific group as per workflow rule. Is there any way to add a link or something in email template so that user can unsubscribe from receiving emails.
When i am trying to deactivate the user below error message i am getting:-
You cannot deactivate a user who is receiving cases or notifications as part of your case assignment/escalation rules.   Click here to view your case assignment / escalation rules. 
When i am trying to deactivate the user below error message i am getting:-
You cannot deactivate a user who is receiving cases or notifications as part of your case assignment/escalation rules.   Click here to view your case assignment / escalation rules. 
Users should be able to add cc's to cases when they create them and to add/delete cc's during the case's life. Add one cc's field which data type is email on case object. When user add new comments on case  it's  automatically copied to cc's
How can I add a default email address to which all communications on cases will go to, for the account the case is opened for?
 How does the Reopen Case button manage to change the status? And should they be able to add comments to closed cases?
Change case status from new to working when any comment is added to the case through trigger. Users can not update the case through SF UI.
How can we change case status from new to working when any comment is added to the case. Users can not change case status from salesforce UI.
How can case owner and case team get a notification when an attachment is added to a case??
Users should be able to add cc's to cases when they create them and to add/delete cc's during the case's life in salesforce
There are so many article type i have created like "Release info", "General". Is it possible to Display that article type  in article column view . 
how can we  import the documents from other places and import them into SF 
We want the users to be able to manage the subscriptions to the alerts themselves. I think the best option is to have a couple of checkboxes in the Portal UI which map to the corresponding checkboxes in the User record.

There are a couple of ways we could do this:

1)      Add the checkboxes to the Email Settings page (which has “Choose to receive  Community emails so user don’t miss important updates”.

2)      Add a new “Notifications” table to the portal (e.g. Home, Cases, Subscriptions,Notifications, Contacts, Accounts, Reports.
Please assist by pointing me in the right direction, I’d appreciate it.
In case there is many public/private comment. Is there any way to filtering  so that user can see public/private comment separately. 
I have one custom field "Notify me on new release" on user object whose data type is checkbox. I have added user to public group  based on role e.g. "Partner community manager"  . There are 50 users belongs to  "partner community manager" and i want to remove any one user from the group when i deselect "notify me on new relese " checkbox field in user detail page. .Right now i can add or remove  user to public group "alert" through below code. 

trigger AddingtoAlertPublicgroup on User (after insert,after Update) {
   List<GroupMember> grpMemlist = new List<GroupMember>();
    Set<Id> userIdsToProcess = new Set<Id>();
    Set<Id> usersToBeRemoved = new Set<Id>();
    Id alertGroupId;
    for(User Usr : Trigger.New){
        if(trigger.isInsert){
            if(Usr.Notify_me_of_releases__c){
               userIdsToProcess.add(Usr.Id); 
            }
        }
        if(trigger.isUpdate){
            if(Usr.Notify_me_of_releases__c && !trigger.oldMap.get(Usr.Id).Notify_me_of_releases__c){
                userIdsToProcess.add(Usr.Id);
            }
            if(!Usr.Notify_me_of_releases__c && trigger.oldMap.get(Usr.Id).Notify_me_of_releases__c){
                usersToBeRemoved.add(Usr.Id);
            }
        }
    }
    
    if(!userIdsToProcess.isEmpty() || !usersToBeRemoved.isEmpty()){
       List<Group> alertGroup = [SELECT Id FROM Group Where DeveloperName='Alert' LIMIT 1];
       if(!alertGroup.isEmpty()){
          alertGroupId =  alertGroup[0].Id;
       }      
    }
    for(User Usr : Trigger.New) {
        if(Usr.Notify_me_of_releases__c && userIdsToProcess.contains(Usr.Id) && alertGroupId != null) {
            GroupMember gm = new GroupMember();
            gm.GroupId = alertGroupId;
            gm.UserOrGroupId = Usr.Id;
            grpMemlist.add(gm);         
        }
    }
    if(!usersToBeRemoved.isEmpty() && alertGroupId != null){
        List<GroupMember> grpMemToBeDeleted = [SELECT Id FROM GroupMember WHERE GroupId = :alertGroupId AND UserOrGroupId IN :usersToBeRemoved];
        if(!grpMemToBeDeleted.isEmpty()){
            delete grpMemToBeDeleted;
        }
    }
    
    if(!grpMemlist.isEmpty()) {
        insert grpMemlist;
    }

}
I have one custom field on user object like "Notify me of releases" which data type is checkbox . When user select "Notify me of releases" checkbox checked  user will get notification for every update of  article whose type is alert. 
Note:- I have created one article type alert.
I have created some article whose type is General. Once we create and publish article, email notification goes to the specific group as per workflow rule. Is there any way to add a link or something in email template so that user can unsubscribe from receiving emails.
When i am trying to deactivate the user below error message i am getting:-
You cannot deactivate a user who is receiving cases or notifications as part of your case assignment/escalation rules.   Click here to view your case assignment / escalation rules. 
When i am trying to deactivate the user below error message i am getting:-
You cannot deactivate a user who is receiving cases or notifications as part of your case assignment/escalation rules.   Click here to view your case assignment / escalation rules. 
Change case status from new to working when any comment is added to the case through trigger. Users can not update the case through SF UI.

Hi,

 

Is it do-able to replace the standard case comment related list and replace it with a custom visual force page?

 

And if it is possible how difficult it is?

 

Thank you.

  • October 12, 2009
  • Like
  • 0