• Elad Idan
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi, I am trying to create a Visual Force email template that would display recently shipped items and tracking.

From the App Exchange, I downloaded "Product Line Items in Email Templates."

Its semi helpful, but it includes Opportunity and Products which seems to be a related or maybe lookup relationship.

In our system, the related Objects are a Master Detail Relationship.
Accounts -> Sales Orders -> Sales Order Lines

I am trying to do two unique things.

1. In terms of who gets emailed, instead of a Contact, is it possible to send an email to an address in an email field on the Sales Order Record, and if that is blank/null, send it to an address an on the Account object?

2. The Sales Order Lines will likely include Products and tracking. (I might need to make additional tweaks)
To display Products, I'd like to show Sales Order Lines where Line Status equals Shipped today.
To display tracking, I'd like to show Sales Order Lines where Description starts with TRPK.  (In our system, tracking lines display as TRPK 1Z11205, someting along those lines.)

If anyone can provide guidance to get me going, that would be appreciated.

Thanks,

Aron