0

We have a process which has this criteria:

enter image description here

The XML metadata for this workflow has:

            </conditions>
                ...
                <leftValueReference>myVariable_current.RelatedToId</leftValueReference>
                <operator>StartsWith</operator>
                <rightValue>
                    <elementReference>formula_2_myRule_1_5825545192</elementReference>
                </rightValue>
            </conditions>

The error appears to be complaining about the left side operand, myVariable_current.RelatedToId, which in the flow (shown in the image above, in the popover) is [EmailMessage].RelatedToId.

Are we missing some scratch org config setting to enable email in scratch orgs? This process is already deployed to other environments with the same metadata, so it's unclear what's causing this.

1
  • EmailMessage has been around forever as it is used in email2case; IN Setup, Enhanced Email enables it for other custom objects
    – cropredy
    Commented Jun 4, 2020 at 6:12

1 Answer 1

0

As hinted at by the comment, this feature comes from the "enhanced email" setting. I fixed the error by enabling that setting in a scratch org:

"settings": {
    "emailAdministrationSettings": {
        "enableEnhancedEmailEnabled": true
    }
}

You must log in to answer this question.

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