-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
26Questions
-
35Replies
Apex Batch Script to Opt All Users
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.
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.
- Praveen Jha
- February 19, 2015
- Like
- 0
- Continue reading or reply
Display article type in column view -Urgent
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 .
- Praveen Jha
- February 13, 2015
- Like
- 0
- Continue reading or reply
Limits to the numbers of members of a Public Group
There are any limits to the numbers of members of a Public Group??
- Praveen Jha
- February 10, 2015
- Like
- 0
- Continue reading or reply
Change case status when attachment is added
When I add attachment on case, case status should change from new to working. How can i do this??
- Praveen Jha
- February 04, 2015
- Like
- 0
- Continue reading or reply
display all public comment on case - Urgent
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.
- Praveen Jha
- February 03, 2015
- Like
- 0
- Continue reading or reply
import product documentation
how can we import the documents from other places and import them into SF
- Praveen Jha
- January 20, 2015
- Like
- 0
- Continue reading or reply
Updating the Portal UI
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.
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.
- Praveen Jha
- January 19, 2015
- Like
- 0
- Continue reading or reply
Filtering public/private comment on case
In case there is many public/private comment. Is there any way to filtering so that user can see public/private comment separately.
- Praveen Jha
- January 14, 2015
- Like
- 0
- Continue reading or reply
Add/remove user to specific group based on role when checkbox is selected - Very Very Urgent
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;
}
}
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;
}
}
- Praveen Jha
- January 13, 2015
- Like
- 0
- Continue reading or reply
sending email notification to user when article is published
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.
Note:- I have created one article type alert.
- Praveen Jha
- January 10, 2015
- Like
- 0
- Continue reading or reply
Add a link or something that would let them unsubscribe from receiving emails- Urgent
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.
- Praveen Jha
- December 31, 2015
- Like
- 0
- Continue reading or reply
Unable to deactivate the user- Very Urgent
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.
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.
- Praveen Jha
- December 24, 2014
- Like
- 0
- Continue reading or reply
Unable to deactivate the user- Urgent
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.
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.
- Praveen Jha
- December 23, 2014
- Like
- 0
- Continue reading or reply
The ability for users to add cc's to cases-Urgent
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
- Praveen Jha
- December 18, 2014
- Like
- 0
- Continue reading or reply
Adding a default email address to all SFDC comments per account
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?
- Praveen Jha
- December 18, 2014
- Like
- 0
- Continue reading or reply
How does the Reopen Case button manage to change the status? And should they be able to add comments to closed cases?
How does the Reopen Case button manage to change the status? And should they be able to add comments to closed cases?
- Praveen Jha
- December 15, 2014
- Like
- 0
- Continue reading or reply
Change case status from new to working when any comment is added to the case through trigger-Very Very Urgent
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.
- Praveen Jha
- December 12, 2014
- Like
- 0
- Continue reading or reply
Change case status from new to working when any comment is added to the case- Very Urgent
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.
- Praveen Jha
- December 12, 2014
- Like
- 0
- Continue reading or reply
Email notification when an attachment is added to a case-Urgent
How can case owner and case team get a notification when an attachment is added to a case??
- Praveen Jha
- December 04, 2014
- Like
- 0
- Continue reading or reply
The ability for users to add cc's to cases
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
- Praveen Jha
- December 01, 2014
- Like
- 0
- Continue reading or reply
Display article type in column view -Urgent
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 .
- Praveen Jha
- February 13, 2015
- Like
- 0
- Continue reading or reply
import product documentation
how can we import the documents from other places and import them into SF
- Praveen Jha
- January 20, 2015
- Like
- 0
- Continue reading or reply
Updating the Portal UI
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.
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.
- Praveen Jha
- January 19, 2015
- Like
- 0
- Continue reading or reply
Filtering public/private comment on case
In case there is many public/private comment. Is there any way to filtering so that user can see public/private comment separately.
- Praveen Jha
- January 14, 2015
- Like
- 0
- Continue reading or reply
Add/remove user to specific group based on role when checkbox is selected - Very Very Urgent
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;
}
}
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;
}
}
- Praveen Jha
- January 13, 2015
- Like
- 0
- Continue reading or reply
sending email notification to user when article is published
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.
Note:- I have created one article type alert.
- Praveen Jha
- January 10, 2015
- Like
- 0
- Continue reading or reply
Add a link or something that would let them unsubscribe from receiving emails- Urgent
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.
- Praveen Jha
- December 31, 2015
- Like
- 0
- Continue reading or reply
Unable to deactivate the user- Very Urgent
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.
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.
- Praveen Jha
- December 24, 2014
- Like
- 0
- Continue reading or reply
Unable to deactivate the user- Urgent
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.
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.
- Praveen Jha
- December 23, 2014
- Like
- 0
- Continue reading or reply
Change case status from new to working when any comment is added to the case through trigger-Very Very Urgent
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.
- Praveen Jha
- December 12, 2014
- Like
- 0
- Continue reading or reply
Replace case comments page with visual force
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.
- kminev
- October 12, 2009
- Like
- 0
- Continue reading or reply