FAQ

Prev Next


Here
is a list of frequently asked questions  to the support :

How to display a new currency on the invoice PDF

Question:
You have changed the currency on your invoice record.
Now you would like to display it on your PDF template.
This does not happen automatically.

Answer:
Once you've activated the multi-currency option in the Salesforce org ( ), you need to add a piece of code to the PDF template that refers to a field on the invoice. 

Here are the steps to follow:

1. Go to Setup > Custom code > Visualforce pages.
2. Open the Visualforce page for your invoice.
3. If you can't remember the name, go to Corporate name and look at the default template name.
4. On the Visualforce page, click on the Edit button.
5. Then, add the code :

p_currency="{!sofactoapp__Factures_client__c.CurrencyIsoCode}"

in every tag that contains an amount :

Here are some examples of fields :

  • Unit price

  • Amount excl. VAT

  • Total VAT

  • Total incl. VAT

  • Discount amount 

6. Save the Visualforce page. 
7. Check the generated PDF: the new currency appears.

How to apply dynamic formatting to currency fields 

Frisbii offers a standard component for dynamic formatting of currency fields in Visualforce PDF template pages.

This component allows you to :

  • Format amount according to language setting (X,XXX.XX€ or X XXX,XX€),

  • Display currency symbol (single currency) or currency iso code (multi-currency),

  • Hide display of org currency countervalue (amount in brackets visible for currency fields on a multi-currency platform)

To set up this component in your Visualforce templates, use the following syntax:

<sofactoapp:CurrencyFormat p_amount="{!sofactoapp__Factures_client__c.YOUR_CURRENCY_FIELD} p_scale="X" p_currency="{!sofactoapp__Factures_client__c.CurrencyIsoCode}"  />

N.B. :

  • This component is available from version 3.52.

  • "p_scale" controls the number "X" of decimal places. It is optional; the component natively displays 2 decimal places.

  • "p_currency" is only available for multi-currency platforms and displays the currency iso code (EUR) or the symbol (€).

WarningIn some versions of Frisbii, when using this component on an amount with zero decimal places, as in 500.00€, it will be displayed as "500€" and not "500.00€".
Using p_scale="2" doesn't solve the problem, you need to add the parameter p_stripTrailingZeros="2"   

To display the symbol in a multi-currency configuration, create a formula field that displays the symbol according to the iso code value. We suggest this text-type formula field to be added to the invoice and used in the p_currency="{!sofactoapp__Invoices_Customer__c.Your_field__c}" :

CASE(CurrencyIsoCode, 

'EUR',"€", 
'USD',"$", 
'GBP','£', 
'INR','₹', 
'AUD','$AU', 
'CAD','$CA', 
'SGD','S$', 
'CHF','SFr.', 
'JPY','¥', 
'CNY','¥', 
null 
)
Examples of display on a field of an invoice of 15,000 dollars, in a multi-currency org with euro as org currency and having the problem of 00 decimal places not displayed. The Currency_Symbol field is the formula field proposed above.

Display

Code

15000.00      

<apex:outputText value="{!sofactoapp__Factures_Client__c.sofactoapp__Amount_VAT__c}"/>

USD 15000.00
(EUR 12000.00)   

<apex:outputField value="{!sofactoapp__Factures_Client__c.sofactoapp__Amount_VAT__c}"/>

15,000 EUR 

<sofactoapp:CurrencyFormat p_amount="{!sofactoapp__Factures_Client__c.sofactoapp__Amount_VAT__c}" />

15,000       

<sofactoapp:CurrencyFormat 
p_amount {!sofactoapp__Factures_Client__c.sofactoapp__Amount_VAT__c}" 
p_currency="$"/>

USD 15,000 

<sofactoapp:CurrencyFormat p_scale="2" p_amount="{!sofactoapp__Factures_Client__c.sofactoapp__Amount_VAT__c}" p_currency="{!sofactoapp__Factures_Client__c.CurrencyIsoCode}"/>

USD 15000.00    

<sofactoapp:CurrencyFormat p_scale="2" 
p_stripTrailingZeros="2" p_amount="{!sofactoapp__Factures_Client__c.sofactoapp__Amount_VAT__c}" p_currency="{!sofactoapp__Factures_Client__c.CurrencyIsoCode}"/>

$15,000.00   

<sofactoapp:CurrencyFormat p_scale="2" 
p_stripTrailingZeros="2" p_amount="{!sofactoapp__Factures_Client__c.sofactoapp__Amount_VAT__c}" p_currency="{!sofactoapp__Factures_Client__c.Currency_Symbol__c}"/>

Starting with the Fall '20 version, Frisbii offers you even more formatting options:

  • p_language: applies a regional format.

    • p_language="en_US" : ex. 125,236.00

    • p_language="fr_FR" : ex. 125 236,00

  • p_stripTrailingZeros: removes zeros after the decimal point, if there is no value.

    • p_stripTrailingZeros = "false" : 125 236,00

    • p_stripTrailingZeros = "true": 125 236

  • p_currency: Option not to display the currency.

    • p_currency="none"

How to avoid a CPU timeout when generating a PDF containing many invoice lines

Question:
You can no longer save or preview a PDF containing many invoice lines.

Answer:
Calculating the display of your PDF takes too long because you have a lot of lines and your PDF template probably has display conditions. For example: display the discount column if there is a discount.

By removing these display conditions(rendered or display if) in your template (the visualforce page) you should save time and be able to generate your PDF again.

Why can't a user see the PDF preview, despite having the right licenses/permission set?

Question:
A user does not see the PDF preview of the invoice or quotation.

Answer:
Please follow these directions:

A) Check that the user has access to the Visualforce page

1. Go to Setup.
2. Type Permission sets in the search bar.
3. Click on Permission sets.
4. Open a set of permissions assigned to the user in question.

Caution: If you're using a packaged authorization set, you'll need to clone it first.

5. In the Applications section, click on to access the Visualforce page.
6. Click on Edit.
7. Search for the Visualforce page among the available Visualforce pages.
8. Click on the Add arrow to move it to the section.

If you do not know the name of the Visualforce page, please follow this procedure:

1. Go to the Invoices tab.
2. Open an invoice. 
3. Click on Create PDF.
4. Move your mouse over the top of the PDF, and the Visualforce page name will appear.

B) Check session settings

1. Go to Setup.
2. Type Session settings in the search bar.
3. Click on Session parameters.
4. Check that Enable clickjacking protection for Visualforce pages on clients with disabled headers is unchecked.

C) Check the boxes checked on the user's registration

1. Go to Setup.
2. Type in the search bar.
3. Click on Users.
4. Find the user in question.
5. Check that the Debug mode box on the user record is unchecked.

D) User browser

Ask the user to clear his cache and, if that doesn't work, to disable his Adblocker.

E) Right : Show configuration

If the user receives the message Insufficient permissions: secure query included inaccessible field :

To generate a PDF, Frisbii needs to know whether the PDF should be stored in Documents (Classic) or Files (Lightning).

This information is stored in a custom parameter that can only be accessed by code if the user has the View setup right. If your user encounters the above error message and doesn't have a gear in the top right-hand corner of his screen, you can give him the system authorization Show configuration.

How to lighten my PDF template 

Question:
My PDF template is too heavy

Answer :
Wecompress is a site that lets you load a PDF to analyze the size of its components.

image.png

Here's an example, where you can see that the PDF is composed of an image measuring 18Kb

image.png

Why can't a user access PDFs created by colleagues?

Question:
A user cannot open PDFs created by colleagues.

Answer:
If users do not have access to the Invoices and or Quotations folder in Files, the PDFs they create are stored in custom folders. Give users access to the Invoices and Quotations folders in Files to avoid this. Here's an article on the subject: 
Modifying file access in Lightning Experience.

Why is my invoice or quotation template not translated?

Question:
I've just changed the language of the invoice, but the language on the PDF doesn't change. However, I've set up a default template from the Frisbii package in my company name. How can I remedy this?

Answer:
If your template is not translated, your translation system may not be active.
We advise you to check this in your setup by searching for the word translation.
In Translation language settings you can activate the translation system, add a language and choose a translator.
The templates in the package are translated into English only.
Here's a Salesforce article on the subject: 
Activating and deactivating the Translation System

Why is a pick list not translated in my PDF template, even though it is translated in the Salesforce translation system?

Question:
The values in a pick list are not displayed in the correct language, despite the language selection on the invoice and the translation set up in the Salesforce translation system.

Answer:
This can happen for our packaged selection lists:

  • Payment term (sofactoapp__Payment_date__c)

  • Payment method (sofactoapp__Payment_mode__c)

  • Type (sofactoapp__Invoice_Type__c)

  • Subtype (sofactoapp__Sous_type__c)

Go to the Visualforce page (Setup > Custom code > Visualforce pages) to check the tag code around the selection list field:

<apex:outputField value="{!sofactoapp__Factures_Client__c.sofactoapp__Type_de_facture__c}" />

To display the values correctly, set outputField instead of outputText.

Please note Styles do not apply to outputFields, as they do to outputText. To apply a style, it must be specified at a higher level.

Example: In the table cell (<td>) :

<td style="vertical-align:top;font-size:17px;">
<apex:outputField value="{!sofactoapp__Factures_Client__c.sofactoapp__Type_of_invoice__c}" />&nbsp;
</td>

Why does the data appear in the wrong column of the table on my invoice/quotation PDF?

Question
The data appear in a different column than expected.

Answer
If you wish to customize your PDF template, we advise against inserting HTML code in the fields of the objects concerned (products, invoice lines, etc.). This can affect the display quality of your PDFs, in particular by displaying data in the wrong place and distorting the layout of the template. 
We recommend inserting the HTML code directly into the Visualforce page of your invoice template.

Why the generated PDF cannot be opened

Question
When I try to open the generated PDF, I get the error message "file damaged".

Answer
Recently, we had this case in support: On analysis, it turns out that the content of the files generated is readable HTML code, not PDF encoding. This HTML code appears to be a Salesforce security page linked to user sessions.

Note
A setting has been changed in the Profile of the user concerned, in the
Session parameters.

Avoid
The Session Security Level field required at login should be set to None and not to High Assurance which is most likely the cause of this redirection (page printed in your generated PDF files instead of the PDF data blob).

Bypass
This parameter is linked to Multi-factor authentication (
MFA), we suggest you instead use the Multi-factor authentication parameter for user interface connections, still at Profile level, but in the System authorizations section.

In a nutshell

Session parameters

Session security level required at login

No

Decrease security access according to the authentication (login) method used for the user's current session. Most connection methods use the Standard session security level. To require multi-factor authentication, increase the level to High Assurance.

System authorizations

Multi-factor authentication for user interface connections

Activated

Ask users to provide another verification method, in addition to their username and password, when logging into a Salesforce organization.

For more information, please read this article: Implementing multi-factor authentication.

Why do I get an error message when saving the Visual Force page?

Message: SObject row was retrieved via SOQL without querying the requested field.

Explanation: This message may have several causes.
It is possible that a character in your code is not accepted by the platform. A frequent occurrence is the " >" character.

How to process this message:
Replace the " > "with " != " .

How to avoid this problem in the future: It's difficult to anticipate this kind of error. We're going to improve this article to guide you through some regularly occurring mistakes.