How to use template merge field on table header?

edited March 2, 2017 in Questions
Is it possible to use a merge field for Custom Label on a table header. For example when listing line items from one opportunity it would be be nice to be able to include the currency with a template on the header of a table. I tried to use template merge fields for table fields without success. I guess this is because that would need to merge for every row in the table. But I would like to get the currency from the parent opportunity and merge with. Is this possible?


  • Zach McElrathZach McElrath Principal Software Engineer Chattanooga, TN 💎💎💎
    edited March 2, 2017
    There are two best approaches to this, depending on whether or not your org is multi-currency or single-currency: (a) Single-currency orgs: just add the currency manually to the column header, e.g.: Custom Label: "Sales Price ($)" (b) Multi-currency orgs: currently you should be able to display the parent Opportunity record's Currency Code (e.g. 'USD', 'GBP', 'EUR'), but not symbol, through template syntax: 1. Assuming that your parent Opportunity record is in a model called 'OpportunityData'), make sure that you add the "CurrencyIsoCode" field to the Model. 2. Use this for your Sales Price field's Custom Label: Sales Price ({{#$}}{{CurrencyIsoCode}}{{/$}}) (This will retrieve the first row in the OpportunityData model, and get the value of its CurrencyIsoCode field). If you'd like to dynamically show the symbol, instead of the code (e.g. $), you could create a Formula Field on the Opportunity object that determines the currency symbol based on the CurrencyIsoCode field, e.g. CASE(CurrencyIsoCode,"USD","$","EUR","€","")
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!