0

I am getting the below error on saving the WF rule: There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was

"Dependent Entity: bad value for restricted picklist field: EmailMessage".

`

AND(if(Incoming = true,true,false),
    if(isclosed = true,true,false),
    OR(if(parent.Recordtype.Name = 'xyz',true,false))
1
  • Did you mean "INCOMING AND (CLOSED OR RECORDTYPE="XYZ")", or did you mean "INCOMING AND CLOSED AND RECORDTYPE="XYZ"? It's not clear from the way you wrote your formula (but, for the record, it currently operates as INCOMING AND CLOSED AND RECORDTYPE="XYZ").
    – sfdcfox
    Commented Aug 14, 2013 at 15:34

2 Answers 2

1

Parent.RecordType.Name is not supported, as far as I can tell. Instead, it appears you have to filter by record type ID. I was able to make a rule that would work:

AND(INCOMING, PARENT.ISCLOSED, PARENT.RECORDTYPEID='0123000000000000')

Admittedly, this isn't a best practice, so you should probably instead use standard filters:

(Email Message: Is Incoming EQUALS True) AND (Case: Closed EQUALS True) AND (Case: Case Record Type EQUALS ABC)
3
  • I am currently using the standard filters,but we want to bypass this rule for few profiles so we are using a custom setting. I am not able to add the custom setting in the standard filter. Commented Aug 19, 2013 at 13:11
  • That makes sense. In that case, did the parent.recordtypeid method work?
    – sfdcfox
    Commented Aug 19, 2013 at 17:57
  • I was already using the above approach but its not the best approach. Any how it works thanks. Commented Aug 22, 2013 at 12:24
1

A workaround is suggested at https://success.salesforce.com/issues_view?id=a1p30000000SzitAAC :

Create a formula on the object to fetch the record type name, and use that formula. That workaround worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .