Mark Kilsdonk
Read all my blogsAdding a formatted free text to your pdf forms in SAP Cloud for Customer
Since the 1511 release it is possible to define your own formatted text field as an extension to basically any object in SAP Cloud for Customer and add this field to your PDF form templates. Relatively simple in concept, but it provides the flexibility to add (formatted) free text to the generated output for all transactional- and master data objects in C4C that did not have the option before.
This blog shows how it can be done for the tickets in SAP C4C. Generating a PDF summary for a ticket has always lacked the option to add a formatted free text or note, but with this extension mechanism we can add a free text to the ticket and have it included in the PDF summary. This upgrades this ticket summary to a potential letter or any other kind of output that can be sent to your customers in a well formatted way.
Define the extension field
Let’s start with adding the extension field to the ticket detail screen in SAP C4C. Open a ticket from the ticket queue and start the adaptation mode for the master layout (from the adapt menu in your administrator role). Using the key user tool, one can add a new extension field basically anywhere within this ticket screen. In this case we choose to add the new field of the formatted text type on an empty, additional tab page, because the extension fields of this type are quite spacious.
Make the extension field available to the form templates
The next step is making this new extension field available to all ticket or service request related pdf form templates. Still in adaptation mode of the master layout, hoover over the new field and select the wrench icon to go to the field definition.
In the field definition of our new extension field, open the form templates tab and select the + icon for one of the available pdf form templates. Selecting just one of the icons will nevertheless make this field available to all pdf form templates that are assigned to the ticket object in SAP C4C.
Add the field to your own form template
Now that the field is available to the form templates, the next step is actually adding this field to our own pdf form template. Launch the Silverlight user interface from the adapt menu in your administrator role and open the form template maintenance tool.
We have copied the standard ‘Service Request’ form template to our own form template, named it the ‘Acorel blog sample’ and removed all fields from it that are not relevant for this explanation. Now we will further edit this form template to add the new text field. The necessary settings to correctly add a field of the formatted text type can only be done using the Adobe LiveCycle Designer (which can be downloaded and installed from the ‘Downloads’ section in SAP C4C).
Download the relevant form template to your local drive, extract the contents of the resulting zip file and open the .xdp file in the Adobe LiveCycle Designer. Once the form template has been opened in this tool, add a new text field to it and change its object field properties to give it a caption (in this example we choose not to have a caption), allow for multiple lines and set the field format to rich text. The field format setting is important to ensure that the formatting of the text is also reflected in the pdf form template.
Then move to the object binding properties to enter a field name and to define a data binding that connects this text field to our newly created extension field (of the formatted text type).
Save the changed form template in the Adobe LiveCycle Designer and upload the changed .xdp file using the upload function (to replace the existing variant) in the form template maintenance tool in SAP C4C.
Generate the PDF
All preparations have been done now and it is time to test our new pdf form template. Open a ticket from the ticket queue in SAP C4C, add some formatted free text to the extension field and click the Summary button on the ticket detail button. From the template selection popup select the newly created pdf form template. It will generate the PDF file which will show our formatted free text (see also the image in the starting section of this blog).
10 responses to “Adding a formatted free text to your pdf forms in SAP Cloud for Customer”
Hello, could you tell me how can the pop up appear on the screen? in my c4c when I click preview there is no pop up displayed on my screen, instead the screen automatically generate the preview,
is there any configuration we should perform so that the pop up will appear on the screen once we click preview summary ? thank you
Hi Rindang,
Normally that pop-up will automatically appear if there is more than one active/published template available for the corresponding object (in this case ticket/service request).
Kind regards,
Mark
Great article! I just added a new notes field to our appointments! Very Handy. I just noted that if I have a list with bullet Points, the PDF will not Show it correctly. It ignores the bullte Points and make it a continous text. Is there a Workaround?
Kind regards,
Nils
Hello,
Check the version of your form in properties, and make sure it is greater the 10.0 or greater than 10.0, That’s it.
-Pratik Shekokar
It is true that not all formatting options in a C4C notes fields are properly shown in the generated PDF files. For example the bullet points. This is caused by the fact that C4C uses some HTML tags for formatting that are not supported by the PDF form templates.
There is no easy workaround, although is should be possible to do some scripting in these PDF form templates and dynamically replace the HTML tags provided by C4C with the tags that the PDF format requires.
Hello Mark,
Is it possible to embed an image or pdf from the attachment into the output?
Thanks
Dee Mamusa
This comment has been removed by the author.
Hi Dee,
To be honest I haven't tried that before myself, but if I remember correctly also the attachments on a ticket are available for selection in the Adobe Livecycle Designer so that one can add them to the output forms.
Kind regards,
Mark
Thanks for this one!
Hello,
I am getting the same issue did you get the solution for it?