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
John StanczakJohn Stanczak 

Fix Visualforce code in Email Template

Hello, I have an email Template, that pulls the owner of an RFA, (Which is a TaskRay Task, a custom object created by the third party App TaskRay, and is a child record of an opportunity) with the following code syntax: ({!IF(relatedTo.RFA_Owner__c='','AE Queue',relatedTo.RFA_Owner__c)}) , Everytime an Opportunity is Closed Won. 

The code works fine so long as all the RFA's are owned by the same user, However it fails and pulls the opportunity owner when there are multiple RFA's with different owners attached to the opportunity. I'd like to edit the code syntax such that it references the owner of the most recently entered RFA, but I'm not sure what the proper Syntax would be. Please Advise.