You need to sign in to do that
Don't have an account?
Praveen Jha
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.
So all you need to bypass the validation rule when your case comment is added.
Follow these steps:
1. Create a Checkbox say Validationflag
2. Set it default as Unchecked.
3. Change you validation to add :
CONTAINS($Profile.Name, "Basic") &&
ISCHANGED(Status) &&
NOT(ISNEW()) && (Validationflag__c==false)
4. In your workflow on Cas comment add one more field update to Update the Checkbox on Case Validationflag = true.
5. Create a workflow rule on Case
Rule criteria: Case status= Working
Add Field update
Validationflag =False.
This will ensure that Status can be changed only through Case comment.
This will work.
Thanks,
Pratik
P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
All Answers
Can you elaborate on how you are adding the case comments from trigger, please post the code.
To change the Case status:
You can create a Workflow rule on Case comment on Evaluation Criteria "created" and set rule criteria as case comment body not blank. Add a Field update action and set Case status= Working.
This works fine, as soon as you add case comment, your case status will change to Working.
If case comment is getting added through trigger and if there is a perticular member name in "case comment created by" for every case comment, then add that rule criteria in workflow.
Thanks,
Pratik
Hi pratik thanks for reply, but there is one validation rule who don't allow specific profile to update case status through SF UI :-
CONTAINS($Profile.Name, "Basic") &&
ISCHANGED(Status) &&
NOT(ISNEW())
Can you check it for Basic profile.
So all you need to bypass the validation rule when your case comment is added.
Follow these steps:
1. Create a Checkbox say Validationflag
2. Set it default as Unchecked.
3. Change you validation to add :
CONTAINS($Profile.Name, "Basic") &&
ISCHANGED(Status) &&
NOT(ISNEW()) && (Validationflag__c==false)
4. In your workflow on Cas comment add one more field update to Update the Checkbox on Case Validationflag = true.
5. Create a workflow rule on Case
Rule criteria: Case status= Working
Add Field update
Validationflag =False.
This will ensure that Status can be changed only through Case comment.
This will work.
Thanks,
Pratik
P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
Can you please send the workflow screenshots which you have created in your org?
Thanks,
Pratik