JOP Document Text
Overview
JOP Document Text lets you define reusable text that is automatically printed on sales documents and JOP certificates. Instead of modifying report layouts or maintaining multiple report versions, you can configure document text directly in Business Central.
A document text consists of one or more text lines that can include HTML formatting and wildcards. When a document is printed, JOP Document Text selects all matching document texts, replaces the wildcards with values from the current document, and prints the resulting text in the specified order.
When is a document text printed?
A document text can be restricted so that it is printed only for specific documents. For example, you can define text that applies only to:
- A specific customer or customer group.
- A responsibility center or production department.
- Specific posting groups.
- Specific sell-to, bill-to, ship-to, or VAT countries/regions.
- Specific shortcut dimension values.
- A validity period.
- Specific document types, such as sales quotes, order confirmations, shipments, invoices, credit memos, prepayment documents, pro forma invoices, or JOP certificates.
Multiple languages
A document text can be maintained in multiple languages. When a document is printed, the application first looks for a text in the document language. If no text exists for that language, the default text (blank language code) is used instead.
HTML formatting
When documents are printed using RDLC reports, document text supports a limited subset of HTML tags. This allows you to format text by using features such as headings, paragraphs, bold and italic text, lists, and hyperlinks.
Wildcards
Document text can contain wildcards that are replaced when the document is printed. Wildcards can insert information such as:
- Company information.
- Responsibility center information.
- Operations manager.
- Salesperson.
- Contact person.
- Order, shipment, invoice, or certificate numbers.
- Customer references.
Typical uses
JOP Document Text can be used for many different purposes, including:
- Terms and conditions.
- Delivery and shipping information.
- Payment instructions.
- Country-specific legal information.
- Customer-specific notes.
- Product or production information.
- Quality and inspection certificate text.
- Contact information and signatures.
Create a document text
Use document texts to add standard information to sales documents and JOP certificates. A document text can be printed for all documents or only when specific conditions are met.
To create a document text
- Choose JOP Document Text.
- Choose New.
- Enter a unique Code.
- Enter a Description that identifies the document text.
- Specify the Print Sequence.
Define when the document text is used
You can leave all filter fields blank to make the document text available for all documents. To restrict the document text, specify one or more of the following values:
- Responsibility Center
- Production Department
- Customer
- Customer Group
- General Business Posting Group
- VAT Business Posting Group
- Sell-to Country/Region
- Bill-to Country/Region
- Ship-to Country/Region
- VAT Country/Region
- Shortcut Dimensions 1 through 8
- Starting Date and Ending Date
You must also select one or more document types, such as Sales Order, Sales Invoice, or Sales Shipment.
A document text is printed only if all specified conditions are met.
Leave a field blank if it should not restrict the document text. For example, if only Customer Group is specified, the document text applies to all customers that belong to that customer group.
Enter the document text
After you create the document text, add one or more language versions.
For each language, enter the text that should be printed. If your reports use RDLC layouts, the text can include a limited subset of HTML tags for formatting. You can also insert wildcards to include information from the current document, such as the company name, order number, salesperson, or customer reference.
Example
The following document text is configured:
- Customer Group: EXPORT
- Sales Invoice: Selected
- Print Sequence: 100
The text is printed only on sales invoices for customers that belong to the EXPORT customer group.
If another matching document text has a print sequence of 200, it is printed after this one.
Create language-specific document texts
A document text can be maintained in multiple languages. This allows the same document text to be printed in the customer's language without creating separate document text definitions.
Each language version contains the text that is printed when the document is generated.
Add a language
- Open the required JOP Document Text.
- Select the language code by either entering it or clicking the assist button.
- Enter the document text lines for the selected language.
Repeat these steps for every language that you want to support.
Create a default language
You can create a language version without specifying a Language Code.
This language version acts as the default text and is used when no language-specific text exists for the language of the document.
For example:
| Language Code | Used for |
|---|---|
| (blank) | Default text |
| DEU | German documents |
| ENU | English documents |
| FRA | French documents |
If a document is printed in German, the German text is used.
If a document is printed in Italian and no Italian text exists, the default text (blank language code) is printed instead.
Language selection
When a document is printed, the system selects the language in the following order:
- A document text that matches the document language.
- If no matching language exists, the default document text (blank language code).
The default language is used only when no language-specific document text exists.
Enter document text
The document text consists of one or more text lines.
For RDLC reports, the text can contain a limited subset of HTML tags to apply formatting such as:
- Headings
- Paragraphs
- Bold and italic text
- Numbered and bulleted lists
- Hyperlinks
The text can also contain wildcards that are replaced when the document is printed. For example, you can insert the company name, order number, customer reference, or operations manager without maintaining the information manually in each language.
Example
Suppose you create the following language versions for the same document text:
| Language Code | Text |
|---|---|
| (blank) | Thank you for your order. |
| DEU | Vielen Dank für Ihren Auftrag. |
| ENU | Thank you for your order. |
| FRA | Merci pour votre commande. |
A sales order for a German customer prints: Vielen Dank für Ihren Auftrag.
A sales order for an English customer prints: Thank you for your order.
A sales order for an Italian customer also prints: Thank you for your order. because no Italian language version exists, so the default text is used.
Define when a document text is printed
Each document text can be restricted so that it is printed only for specific documents. By combining one or more selection criteria, you can create document texts that are automatically included only when they are relevant.
For example, you can print:
- Customer-specific information.
- Country-specific legal text.
- Responsibility center contact information.
- Production department instructions.
- Different text for quotations, invoices, and shipments.
Selection criteria
A document text can be restricted by one or more of the following fields:
- Responsibility Center
- Production Department
- Customer
- Customer Group
- General Business Posting Group
- VAT Business Posting Group
- Sell-to Country/Region
- Bill-to Country/Region
- Ship-to Country/Region
- VAT Country/Region
- Shortcut Dimensions 1 through 8
- Starting Date
- Ending Date
- Document Type
Only document texts that satisfy all specified criteria are printed.
Blank fields
Leave a field blank if it should not restrict the document text.
For example, if Customer Group is set to EXPORT and all other fields are blank, the document text is printed for every customer that belongs to the EXPORT customer group, regardless of responsibility center, country, or dimensions.
Likewise, if Responsibility Center is set to FRA, the document text is printed only for documents that belong to the FRA responsibility center.
Validity period
Use Starting Date and Ending Date to limit when a document text can be used.
For example, you can create document text that is printed only during a promotional campaign or for a limited legal requirement.
If one or both date fields are blank, no restriction is applied for that part of the validity period.
Document types
A document text is printed only for the selected document types.
You can select one or more of the following document types:
- Sales Quote
- Sales Blanket Order
- Sales Order
- Sales Shipment
- Sales Invoice
- Sales Credit Memo
- Sales Return Order
- Pro Forma Invoice
- Prepayment Sales Invoice
- Prepayment Sales Credit Memo
- JOP Certificate
If a document type is not selected, the document text is never printed for that type of document.
Multiple matching document texts
More than one document text can match the same document. When this happens, all matching document texts are printed.
The Print Sequence field determines the order in which the document texts are printed. Document texts with lower print sequence numbers are printed before those with higher numbers.
Examples
Customer-specific document text
| Field | Value |
|---|---|
| Customer No. | 10000 |
| Sales Invoice | Selected |
The document text is printed only on sales invoices for customer 10000.
Country-specific legal text
| Field | Value |
|---|---|
| Sell-to Country/Region Code | DE |
| Sales Order | Selected |
| Sales Invoice | Selected |
The document text is printed only on sales orders and sales invoices where the sell-to country or region is Germany.
Responsibility center contact information
| Field | Value |
|---|---|
| Responsibility Center | EAST |
| Sales Shipment | Selected |
The document text is printed only on sales shipments that belong to responsibility center EAST.
Combined conditions
| Field | Value |
|---|---|
| Customer Group Code | EXPORT |
| Ship-to Country/Region Code | US |
| Sales Invoice | Selected |
The document text is printed only when all of the following conditions are met:
- The customer belongs to the EXPORT customer group.
- The ship-to country or region is the United States.
- The document is a sales invoice.
If any of these conditions is not met, the document text is not printed.
Use HTML formatting (RDLC reports)
You can use HTML tags to format JOP document text when the document is printed with an RDLC report layout.
HTML formatting can be used to:
- Emphasize important information.
- Separate text into paragraphs.
- Add headings.
- Create numbered or bulleted lists.
- Insert hyperlinks.
The RDLC report layout must be configured to interpret the document text as HTML. RDLC supports only a limited subset of HTML, so text might not appear exactly as it would in a web browser.
Supported HTML tags
The following HTML tags can be used in JOP document text when it is printed by an RDLC report.
| Purpose | Supported HTML tags |
|---|---|
| Bold text | <b>...</b> |
| Italic text | <i>...</i> |
| Underlined text | <u>...</u> |
| Strikethrough text | <s>...</s> |
| Paragraph | <p>...</p> |
| Block of text | <div>...</div> |
| Inline formatting | <span>...</span> |
| Headings | <h1> through <h6> |
| Bulleted list | <ul>...</ul> |
| Numbered list | <ol>...</ol> |
| List item | <li>...</li> |
| Hyperlink | <a href="...">...</a> |
| Font formatting | <font>...</font> |
HTML tags are not case-sensitive. Unsupported tags are ignored by RDLC reports. If the HTML is not well formed, the content might be displayed as plain text.
Format text
Use the <b>, <i>,
<u>, and <s> tags to format parts
of the document text.
<p>
Please read the following
<b>important delivery information</b>.
</p>
<p>
The delivery date is <i>subject to confirmation</i>.
</p>
The first phrase is printed in bold and the second phrase in italics.
You can combine multiple formatting tags.
<p>
<b><u>Important:</u></b>
Check the goods immediately after delivery.
</p>
Add paragraphs and headings
Use paragraph and heading tags to structure longer document text.
<h3>Delivery information</h3>
<p>
The goods will be delivered to the agreed ship-to address.
</p>
<p>
Notify us immediately if the shipment is damaged.
</p>
Use headings sparingly because the final appearance depends on the RDLC report layout.
Create a bulleted list
Use <ul> together with
<li> to create a bulleted list.
<p>Please check the following when the goods arrive:</p>
<ul>
<li>Quantity</li>
<li>Packaging</li>
<li>Visible damage</li>
</ul>
Create a numbered list
Use <ol> together with
<li> to create a numbered list.
<p>To report a damaged shipment:</p>
<ol>
<li>Take photographs of the damage.</li>
<li>Record the delivery note number.</li>
<li>Contact your responsible salesperson.</li>
</ol>
Add a hyperlink
Use the <a> tag to insert a hyperlink.
<p>
For more information, visit
<a href="https://www.example.com">our website</a>.
</p>
Whether the hyperlink can be selected depends on the report output format and the application that displays the report.
Combine HTML with wildcards
HTML tags and JOP wildcards can be used together.
<p>
Your contact person is <b>%43</b>.
</p>
<p>
Order number: <b>%72</b><br>
Your reference: %73
</p>
When the document is printed, the wildcards are replaced with values from the current document and related master data.
Insert a line break
Use <br> to insert a line break without starting a new
paragraph.
<p>
JOP Manufacturing Ltd.<br>
Example Street 10<br>
12345 Example City
</p>
You can also insert an empty document text line to create a line break.
Limitations
RDLC reports do not use a complete web browser to render HTML. Only the supported subset of HTML is interpreted.
In particular:
- Tables are not supported.
- Images are not supported.
- Scripts and embedded content are not supported.
- External style sheets are not supported.
- Unsupported HTML tags are ignored.
- Malformed HTML might be displayed as plain text.
- The appearance can vary depending on the RDLC layout and output format.
Avoid using unsupported tags such as:
<table>
<img>
<script>
<style>
Use simple, well-formed HTML and test the result in the report formats that your organization uses, such as Preview and PDF.
Example
The following example combines headings, text formatting, lists, and wildcards.
<h3>Important delivery information</h3>
<p>
Thank you for your order <b>%72</b>.
</p>
<p>Please check the following when the goods arrive:</p>
<ul>
<li>Check the delivered quantity.</li>
<li>Check the packaging for visible damage.</li>
<li>Report any differences immediately.</li>
</ul>
<p>
Your contact person is <b>%43</b>.<br>
Email: %47
</p>
When the report is printed, the wildcards are replaced with the values from the current document.
Use Wildcards
Wildcards allow you to insert information from the current document and related master data into a document text.
When the document is printed, each wildcard is replaced with the corresponding value. This means that you only need to maintain the document text once, while the printed information is automatically adapted to the document.
For example, instead of entering the company name manually, you can insert the wildcard for the company name. If the company name changes, all document texts automatically use the new value.
Insert a wildcard
A wildcard consists of a percent sign (%) followed by a
number.
For example:
%1
When the document is printed, %1 is replaced with the company
name.
You can place wildcards anywhere in the document text.
For example:
Thank you for your order %72.
or
If you have any questions, please contact %43.
Combine wildcards with HTML
Wildcards can be combined with HTML formatting.
<p>
Thank you for your order <b>%72</b>.
</p>
<p>
Your contact person is
<b>%43</b>.
</p>
When the report is printed, the wildcard values replace the wildcard codes while the HTML formatting is preserved.
Unavailable values
Some wildcards depend on information that is not available for every document.
For example:
- A document might not have a salesperson.
- A sales order might not have a contact person.
- A responsibility center might not have an operations manager.
If the corresponding information is not available, the wildcard is replaced with an empty value.
Supported wildcards
The following wildcards can be used in JOP document text. When a document is printed, each wildcard is replaced with the corresponding value from the current document or related master data.
| Wildcard | Description | Source |
|---|---|---|
| Company Information | ||
| %1 | Company name | Company Information |
| %2 | Company name 2 | Company Information |
| %3 | Address | Company Information |
| %4 | Address 2 | Company Information |
| %5 | Post code | Company Information |
| %6 | City | Company Information |
| %7 | County | Company Information |
| %8 | Phone number | Company Information |
| %9 | Phone number 2 | Company Information |
| %10 | Fax number | Company Information |
| %11 | Email address | Company Information |
| %12 | Website | Company Information |
| %13 | Giro number | Company Information |
| %14 | Bank name | Company Information |
| %15 | Bank branch number | Company Information |
| %16 | Bank account number | Company Information |
| %17 | Payment routing number | Company Information |
| %18 | Customs permit number | Company Information |
| %19 | Customs permit date | Company Information |
| %20 | VAT registration number | Company Information |
| %21 | Company registration number | Company Information |
| %34 | IBAN | Company Information |
| %35 | SWIFT code | Company Information |
| %36 | Industrial classification | Company Information |
| %51 | Country/Region code | Company Information |
| %52 | Country/Region name | Company Information |
| Responsibility Center | ||
| %22 | Name | Responsibility Center |
| %23 | Name 2 | Responsibility Center |
| %24 | Address | Responsibility Center |
| %25 | Address 2 | Responsibility Center |
| %26 | Post code | Responsibility Center |
| %27 | City | Responsibility Center |
| %28 | Country/Region code | Responsibility Center |
| %29 | Phone number | Responsibility Center |
| %30 | Fax number | Responsibility Center |
| %31 | Email address | Responsibility Center |
| %32 | Website | Responsibility Center |
| %33 | Operations manager | Responsibility Center |
| %48 | Code | Responsibility Center |
| %49 | Country/Region code | Responsibility Center |
| %50 | Country/Region name | Responsibility Center |
| Salesperson | ||
| %43 | Name | Salesperson/Purchaser |
| %44 | Job title | Salesperson/Purchaser |
| %45 | Phone number | Salesperson/Purchaser |
| %47 | Email address | Salesperson/Purchaser |
| Contact | ||
| %67 | Job title | Contact |
| %68 | Initials | Contact |
| %69 | First name | Contact |
| %70 | Middle name | Contact |
| %71 | Surname | Contact |
| %104 | Email address | Contact |
| %105 | Email address 2 | Contact |
| %106 | Phone number | Contact |
| %107 | Mobile phone number | Contact |
| Document | ||
| %72 | Order number | Sales document |
| %73 | Your reference | Sales document |
| %74 | External document number | Sales document |
| %77 | Document number | Shipment, invoice, credit memo or certificate |
Note: The value returned by some document wildcards depends on the type of document being printed. For example
- %77 returns the shipment number, posted invoice number, posted credit memo number, or JOP certificate number, depending on the document being printed.
Print sequence
The Print Sequence field determines the order in which document texts are printed when more than one document text matches the same document.
Matching document texts are printed in ascending print sequence order. Document texts with lower print sequence numbers are printed before those with higher numbers.
When is the print sequence used?
It is common for several document texts to apply to the same document. For example, a sales invoice might include:
- General terms and conditions.
- Country-specific legal information.
- Customer-specific instructions.
- Responsibility center contact information.
The print sequence determines the order in which these document texts are combined in the printed document.
Example
| Print Sequence | Description |
|---|---|
| 100 | General terms and conditions |
| 200 | Country-specific legal information |
| 300 | Customer-specific delivery instructions |
If all three document texts match the document, they are printed in the following order:
- General terms and conditions
- Country-specific legal information
- Customer-specific delivery instructions
Choosing print sequence numbers
Consider leaving gaps between print sequence numbers, such as 100, 200, and 300, instead of using consecutive numbers.
Leaving gaps makes it easier to insert additional document texts later without having to renumber existing entries.
For example, if you later want to print a document text between sequence 100 and 200, you can assign it print sequence 150.
Document texts with the same print sequence
If multiple document texts have the same print sequence, they are printed together. To ensure a predictable output, it is recommended to assign a unique print sequence whenever the relative order of document texts is important.
Best practice
Reserve ranges of print sequence numbers for different categories of document text. For example:
| Range | Suggested use |
|---|---|
| 100—199 | General information |
| 200—299 | Legal text |
| 300—399 | Customer-specific text |
| 400—499 | Responsibility center or production department information |
Using a consistent numbering scheme makes document texts easier to maintain as the number of document texts grows.
