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
jaamsjaams 

Staus change formula

Hi guys,

I am trying to create a formula for Status change. My problem is I have to notify customer as well as MSP team that there is a status change on a MSP case. We have three case types. I just have to inform one of them which is MSP.

 

Can somebody help me with this issue

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

try this:

AND(
ISCHANGED(Status), 
CONTAINS(Additional_Designation__c,"MSP Customer"),   
$RecordType.Name  = "MSP Service Request")

 

All Answers

Steve :-/Steve :-/

Are you trying to do this with a WFR?

jaamsjaams

yes. Here is formula i am trying to use

 

AND(ISCHANGED( Status ), Additional_Designation__c = 'MSP Customer',  RecordTypeId = 'MSP Service Request')

Steve :-/Steve :-/

RecordTypeId is not a Text Value it's the unique SFDC ID of the Record Type record, try using $RecordType.Name

 

AND(
ISCHANGED( Status ), 
Additional_Designation__c = 'MSP Customer',   
$RecordType.Name  = 'MSP Service Request')

 

jaamsjaams

Now its is there is another problem it is not generating any email.

Steve :-/Steve :-/

Can you post the complete WFR and criteria that you're using?  Can you post a screenshot of the WFR and a record that should trigger the email but isn't?

jaamsjaams

When i jsut keep it to 

ISCHANGED( Status ) email alert works.

 

If i add any thing to it. It would not send an email alert.

Steve :-/Steve :-/

Can you post the WFR and screenshots?

jaamsjaams

how can i insert a screen shot 

Steve :-/Steve :-/

you can upload an image or a link to a hosted image (like Picasa, Flickr, SlideShare, GoogleDocs, etc) using the Link or Image button in the toolbar above where you enter your comments (right next to the smiley face)

Steve :-/Steve :-/

The WFR is not Active, that's why it is not firing.  There is an Activate Button and an Active checkbox field.

Steve :-/Steve :-/

Also, what are the datatypes of the fields that you're evaluating in your WFR?

Steve :-/Steve :-/
jaamsjaams

i activated it. sorry for that

Steve :-/Steve :-/

what are the datatypes of the fields in your formula, and can you post a screenshot of the record that should be firing the email but is not?

jaamsjaams

Email Alert Page:

 

https://picasaweb.google.com/lh/photo/ji12koAHB5u8lu7W8ZdybxM8X6j9Xrsbckl2tIpq1Xo?feat=directlink

 

Email Alert suppose to send an email to recipients:

 

https://picasaweb.google.com/lh/photo/e3pFovkedB0VhmsRjji_FhM8X6j9Xrsbckl2tIpq1Xo?feat=directlink

 

Standard Field.

1. Stauts: Picklist

2. Record Type: Recordtype

Custom Fields

1. Additional_Designation__c: Text (30)

Steve :-/Steve :-/

can you post a screenshot of the record that meets the WFR criteria but will nor trigger the WFR?   

jaamsjaams

i don't understand it. what do you mena by that.

Steve :-/Steve :-/

You said that the WFR would not trigger the email alert correctly with the Formula I posted.  I need to see a record that should trigger the WFR but is not, so that I can figure out what the problem is.

jaamsjaams

i have no clue how to find the error message for that

Steve :-/Steve :-/

I don't need the error message, a while back you posted this comment

"If i add any thing to it. It would not send an email alert. When i jsut keep it to ISCHANGED( Status ) email alert works." 

 

So that means that there is either something wrong with the WFR or there is something wrong with the Case record you used to test the WFR.  That is why I need to see the Case record 

 

jaamsjaams

sorry about it but i still didn't get what you actually want to see. i am sorry

Steve :-/Steve :-/

*sigh*  you're killing me...  (like a cigarette) in a slow, almost passive kinda way you are killing me...  

Steve :-/Steve :-/

is that a joke?  I don't need to see the Chatter Feed, I need to see the Record Details.  I need to see the fields on the record that are being evaluated on your WFR.  

Steve :-/Steve :-/

Can you post the screenshot with the record details like I asked, or is this just a waste of time? 

Steve :-/Steve :-/

I'm going to ask for this one last time and then I'm walking away from this for good.  

 

I need you to post a screenshot of the CASE RECORD that meets the WFR criteria but is not triggering the WFR Email.

 

LIKE THIS ->

 

jaamsjaams







Case Record Type

RecordTypeRecord Type
jaamsjaams
Steve :-/Steve :-/

You said that the WFR was not working properly because the Email was not being triggered when the Case Status was changed and the Case met the WFR criteria, so that means that either the WFR is wrong, or the Case record does not meet the WFR criteria.  That's why we need to look at the field on the Case record and see if they do or do not match the WFR.  I cannot see the Case Record Type in your screenshot (that is one of your WFR criteria)  

Steve :-/Steve :-/

also, your additional designation field is just text, not a picklist so just to be safe use a CONTAINS function instead of an = operator

 

AND(
ISCHANGED(Status), 
CONTAINS(Additional_Designation__c,"MSP Customer",   
$RecordType.Name  = "MSP Service Request")

 

jaamsjaams

It is still generating an error message: Error: Syntax error. Missing ')'

Steve :-/Steve :-/

try this:

AND(
ISCHANGED(Status), 
CONTAINS(Additional_Designation__c,"MSP Customer"),   
$RecordType.Name  = "MSP Service Request")

 

This was selected as the best answer
Steve :-/Steve :-/

just an FYI but when the error message says "Missing ')'" just look for the missing right paren

jaamsjaams

it had stop sending email alert again. 

Steve :-/Steve :-/

okay then remove each line from the WFR Formula 1 at a time and test it again, there is either something wrong with the WFR or the Record.  Also verify the spelling and punctuation of the text in the dditional_Designation__c and $RecordType.Name match the spelling and punctuation EXACTLY (upper/lower case, blank spaces, everything) 

jaamsjaams

When ever i put this (Additional_Designation__c,"MSP Customer") It stop working other it works fine without it.

Steve :-/Steve :-/

okay that means that the value in the Case field does not match the spelling in your formula, you'll need to fix it so that they match EXACTLY

jaamsjaams

let me take a look into it. I really appreciated all your help and patience.

jaamsjaams

This (Additional_Designation__c,"MSP Customer") is not a pick list or any thing it have to fill out by user thats why i think it is gving this error please advise

Steve :-/Steve :-/

If I were you I would just change the field to a picklist. but that's your call (it's your SFDC Org)  letting users just enter whatever the hell they want and then trying to trigger the WFR or a VR off it is just BAD CRAZY

jaamsjaams

Thanks for all your help let me try to figure it out with user what they want to do with it. have a great day

Steve :-/Steve :-/

Are you all set with this now or do you still need help?

jaamsjaams

Thank a lot for all your help and pateince. Yes it is resolved. I am really thankful to you.