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
Dru - Cloud62Dru - Cloud62 

Can't format via javascript when renderAs PDF

I have used javascript to split up the output of a currencyfield so that I can get the first currency and put it in parens while getting rid of the converted currency if there is one displayed.

 

This trick is working fine.

 

However, I cannot use this trick to format the output of a outputField for a currency field when the page attribute renderAs='PDF'

 

Does anyone know how I can use javascript in a renderAs='PDF' or how to edit the manipulate a currency outputField in the controller?

 

To give you more background I am making a custom display for a currency field. The user can input the currency in any isocode and it will display as:

USD $###,###.## (EUR ###.###,##)

 

The EUR in the example is the actual currency on the object.

 

Thanks,

-Dru

vishal@forcevishal@force

You cannot use javascript or any kind of AJAX when rendering a page as PDF.  You can try formatting the currency using apex:outputText formatting.

Dru - Cloud62Dru - Cloud62
Yes that is what I ended up doing. This solution still isn't perfect as it does not account for different currencies delimiters. -- Dru Luce-Edwards Dru@cloud62.com 276-870-7158 www.cloud62.com Your success in the cloud