1

In an email template it is possible to reference attributes by doing...

"{!relatedTo.opportunity__r.CloseDate}"

However, if the attribute must be in your model. If you did,

"{!relatedTo.opportunity__r.CloseDate_blah_blah__c}"

The save would not be allowed. You might think fair enough it is not in the model it is catching an error. But what if you are writing an email template which uses attributes that are going to come from another package? Is there anything like dynamic soql which allows the check to made at runtime?

Thanks.

  • You could use a component driven by a controller to do the dynamic soql? – techtrekker Feb 13 '13 at 23:32
  • @dublintech could you clarify whether you just want to use fields from a managed package, or whether you're trying to inject fields at run time? – Ralph Callaway Feb 19 '13 at 15:47
  • @dublintech, did my answer help at all? – Ralph Callaway Mar 15 '13 at 20:05
1

If the field is in a managed package you'll need it installed in the org your developing it. It'll validate the field exists at compile time just like you'd expect with unmanaged fields. Only difference is the managed package field will have a namespace. For example

{!relatedTo.opportunity__r.namespace__managed_package_field__c}

If you're trying to build an email that has configurable fields you'll want to look at using field sets.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.