• Stephen Ross
  • NEWBIE
  • 0 Points
  • Member since 2017
  • Sales Ops Analyst
  • SciQuest

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I know close to ZERO about Apex code so trying to edit the existing Visualforce/apex code in our email template is crazy hard, but what I'm trying to do it limit the duplication of return data to one unique line per product.

Here is the code within our email template:

<table border="0" >
                 <tr >
                     <th>Quantity</th><th>Product Name</th>
                  </tr>
    <apex:repeat var="opp" value="{!relatedTo.OpportunityLineItems}">
       <tr>
            <td>{!ROUND(opp.Quantity,0)}</td>
            <td>{!opp.PriceBookEntry.name}</td><br/>
       </tr>
    </apex:repeat> 
    </table>

We implemented a new CPQ tool that now shows each line item x the number of years on the contract, rather than one line item per the contract.  Meaning, instead of this portion of our email alert showing (using a 3 year term):

QTY  Product Name
1        Product 1
5        Product 2
1        Prodcut 3

It now shows:

QTY   Product Name
1        Product 1
1        Product 1
1        Product 1
5        Product 2
5        Product 2
5        Product 2
1        Prodcut 3
1        Prodcut 3
1        Prodcut 3

Anything anyone can offer an Apex newbie would be greatly appreciated!
I know close to ZERO about Apex code so trying to edit the existing Visualforce/apex code in our email template is crazy hard, but what I'm trying to do it limit the duplication of return data to one unique line per product.

Here is the code within our email template:

<table border="0" >
                 <tr >
                     <th>Quantity</th><th>Product Name</th>
                  </tr>
    <apex:repeat var="opp" value="{!relatedTo.OpportunityLineItems}">
       <tr>
            <td>{!ROUND(opp.Quantity,0)}</td>
            <td>{!opp.PriceBookEntry.name}</td><br/>
       </tr>
    </apex:repeat> 
    </table>

We implemented a new CPQ tool that now shows each line item x the number of years on the contract, rather than one line item per the contract.  Meaning, instead of this portion of our email alert showing (using a 3 year term):

QTY  Product Name
1        Product 1
5        Product 2
1        Prodcut 3

It now shows:

QTY   Product Name
1        Product 1
1        Product 1
1        Product 1
5        Product 2
5        Product 2
5        Product 2
1        Prodcut 3
1        Prodcut 3
1        Prodcut 3

Anything anyone can offer an Apex newbie would be greatly appreciated!
Has anyone gotten the Excel Connector (https://code.google.com/p/excel-connector/) to work in Excel 2016?