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
Sanjeev SFDCSanjeev SFDC 

How to print Currency Symbols automatically(Not hard coding)

     i have two users  one user is using currency as Rupee and another user is using Dollar,if i'm generating pdf for these currency fileds how to get the currency symbols for ( U S user $, indian User Rupee) automatically .


See if this post helps
We have the native field in  object (CurrencyIsoCode) and by default the field is setup with default language - English. You can get the required language in Pdf if you update currencyisocode in the object.

Please let me know if it helps

Create a Static Map similar to this :( I am listing only few countries here for reference)

public with sharing class CurrencyMetadata
public static final Map<String, Metadata> CURRENCY_METADATA = new Map<String, Metadata>
  'ADP' => new Metadata('', 'Andorran Peseta'),
        'AED' => new Metadata('', 'UAE Dirham'),
  'AFA' => new Metadata('', 'Afghanistan Afghani'),
  'ALL' => new Metadata('Lek', 'Albanian Lek'),
  'AMD' => new Metadata('AMD', 'Armenian Dram'),
  'ANG' => new Metadata('ƒ', 'Neth Antilles Guilder'),
  'AOA' => new Metadata('', 'Angola Kwanza'),
  'ARS' => new Metadata('$', 'Argentine Peso'),
  'ATS' => new Metadata('', 'Austrian Schilling'),
  'AUD' => new Metadata('$', 'Australian Dollar'),
  'AWG' => new Metadata('ƒ', 'Aruba Guilder'),
  'AZM' => new Metadata('', 'Azerbaijanian Manat'),
  'BAM' => new Metadata('KM', 'Bosnia and Herzegovina Convertible Marks'),
  'BBD' => new Metadata('$', 'Barbados Dollar'),
  'BDT' => new Metadata('Bt.', 'Bangladesh Taka'),
  'BEF' => new Metadata('', 'Belgian Franc'),
  'BGL' => new Metadata('', 'Lev')

Use the above Static MAp in Controller to dynamically display on the VF Template based on the Currency ISO Code.