1

I recently performed a data type conversion from text to pick list. So now my field is of data type pick list. It will be used on task records when the record is dynamically created by python integration. The field is a picklist on the new task record which I can confirm. enter image description here

However , when I tried to use this field as a parameter to the ISPICKVAL() function inside a Visualforce email template, I got an error: enter image description here

Q) Why would a newly converted pick list field fail to be used as a parameter inside the ISPICKVAL() function? That does not seem to make any sense. Note: the relatedTo field in the VF email template is set to Task. Thanks

2
  • 1
    I think ISPICKVAL is just not supported in a Visualforce Template. Hard to find a concrete indication of that in the documentation though.
    – Adrian Larson
    Jul 27, 2020 at 13:55
  • Wow, thanks @AdrianLarson it sure has a funny way of showing it. I thought I was home free once I solved this because I really didn't want to create a custom field. I looked at this example and that started me down the rabbit trail: developer.salesforce.com/forums/?id=9060G0000005ZzPQAU Jul 27, 2020 at 14:21

1 Answer 1

0

After looking at https://developer.salesforce.com/forums/?id=9060G0000005ZzPQAU ad speaking with @Adrian Larson, I decided that the quickest and convenient way to accomplish this would be to create a custom formula field because even SF support had stated that they have no documentation on why formulas sometime work and when they don't. Thus they suggested using a formula field. https://trailblazer.salesforce.com/ideaView?id=08730000000BpJR[enter link description here]2

So I have scrapped the use of VisualForce email templates and am now including the custom field into the current HTML email template instead. This is the quickest and cleanest solution for me. After testing the change it worked great!

You must log in to answer this question.

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