Image References in Templates (Pre-FX2)
X-Author can display images in agreement documents by including them in RTF fields and referencing them in agreement templates.
For images to be displayed in an agreement document, there must be a reference to the image available in Salesforce for the merge server to use, so it can place the image in the generated agreement document. Apttus provides this ability through the Upload Image option in the header of an object. This provides the option to upload an image to an RTF field associated with a page layout, which can then be referenced via a merge field in the template used for the agreement document.
If you insert an image into an RTF field in Salesforce without using this feature, it will not be displayed in the agreement document.
The Apttus merge server can use the image's aspect ratio to determine its size on the page. If you set one of either width or height to some value and leave the other at zero, merge server will use the aspect ratio of the image to change the zero value to one which matches the aspect ratio. If you put values in for both width and height; that will be used. If no values are entered, the image will be placed in the document with its original measurements. For example, you have a table cell that is 2x2 inches and an image which has a resolution of 800x600 pixels. If you put the image into the cell, you could set the image width to 2.0 and height to 0.0. When the document is generated, the merge server would set the image height to 1.5, as the aspect ratio of an 800x600 pixel image is 1.33. If you remove the width and height attributes and values, the image will default to 5x7. You can change the default size by clicking Manage from the X-Author login dialog and then selecting the Templates tab.
You can use images up to 1MB in size and .gif, .jpg, and .png file types. To ensure the images will be presented in the document as expected you should work on a draft document in Word first, edit the images as required in an image editor application, and then upload them to an RTF field.
In case your system has not been configured to use image references, please ask your System Administrator to complete the required configuration in Salesforce, before you try to add and reference images.
To add images and upload them to an object
The object must be using a page layout that has the required fields added to it.
- In Salesforce, go to the Agreements tab and select the one you want to upload images to.
- Click Upload Images and select which RTF field to use and click Next.
- Be sure to select the correct field for the page layout, as currently all RTF fields in the system are included in the drop-down list.
- Click Browse and select the required file from the Images folder.
- Click Upload and then click Finish.
The image is now displayed in the RTF field in the object's header section. The image can now be added to templates.
To reference an image in a template
- Login to X-Author and from the X-Author Templates tab click Check-Out.
- Search for the required template and click Open.
- Place the cursor in the template where you want to insert an image and click Insert Merge Field.
- If this is an agreement template, select the Agreement Fields object- or -If this is a proposal template, select the Quote/Proposal Fields object.
- Select the RTF field you want to insert as a merge field and click Insert Field.
You can change the default width and height as required. Measurements are in inches. When you preview or generate an agreement or proposal document using the template, images are included in the generated document.
To configure Upload Image action
This task assumes you want to configure an agreement object, other objects can also be configured in a similar manner.
- Go to .
- In the Custom Fields & Relationships section, click New.
- Select Formula and click Next.
- Enter a Field Label and Field Name, such as Upload Image, select Text from the Formula Return Type list and click Next.
- Enter the formula below, ensuring it is all on the same line in the formula field, like the screen shot, and click Next.
- The code should be:HYPERLINK("/apex/Apttus__ImageUpload?id="& Id, IMAGE("/resource/Apttus__Button_UploadImage", "Upload Image"),"_self")
- Set the field-level access and click Next.
- Click Save.
You can select page layouts here, but as you will likely want to edit the page layouts to reposition the Upload Image button, it is not required at this point. Upload Image is now available from the Fields list when you edit a page layout.
- You could add image support to Quote/Proposals by repeating this task for that object.
- You should also create RTF fields for the images if they do not already exist.
To create a Rich Text Area
This task assumes you want to configure an agreement object, other objects can also be configured in a similar manner.
- Go to .
- In the Custom Fields & Relationships section, click New.
- Select the Text Area (Rich) and click Next.
- Enter a Field Label and Field Name, such as RTF Image, and click Next.
- Set the field-level access and click Next.
- Click Save.
You can select page layouts here, but as you will likely want to edit the page layouts to reposition the RTF area, it is not required at this point.The rich text area is now available from the Fields list when you edit a page layout.You can create more rich text areas if you want to have more images available for your documents.
To configure Image Reference fields
- Go to and select the one you want to add Image Reference functionality to.
- From the Fields list select the RTF fields you want to use for images and add them to the Information section.
- Then select Upload Image from the Fields list and add it to the Information section.
- Click Save.
Repeat steps 1 to 4 for any other required Agreement object or Proposal object page layouts. The fields will now be displayed on objects using those page layouts. When you go to the object, there will be an Upload Image button, along with the RTF fields in the object's header section.