Generating Report
Output Documents are reports built as SFM transactions to generate an Output Document for a header record with or without its child records. An Output Document is delivered as an HTML page and can be converted and saved as a PDF file. It includes ServiceMax and Salesforce data.
For example, after de-briefing a Work Order, the technician can generate a report or invoice of the services provided. The data included in an Output Document for a Work Order Report can be a company name, company logo, Work Order details such as Work Performed, Billing Type, and Total Billable Amount, Work Detail information such as Parts and Labor consumed, and so on.
On launching the Output Document Delivery engine, configured data binding is performed to retrieve data from all the relevant ServiceMax records.
To generate a service report:
1. Open any record.
2. Launch an Output Document Wizard. The formatting of data, calculation of the sum of the values, and embedding of images are performed and the report is generated with a Save and Cancel button.
3. Click Save button to generate the PDF file. The following screen is displayed, with an option to delete the attachment. The header record’s name field value is shown as a hyperlink, allowing you to navigate back to that record.
PDF Generation Filename
The admin can edit the file format in the Template Designer. Suppose the return value for the defined file format is blank. In that case, the report will be generated with the default file format <Output Document SFM Transaction ID>_<SFID of the header record>_<yyyyMMddHHmmss>.
Error in Output Document Process
If the field API name configured is incorrect or does not exist, an error message is displayed on invoking the Output Document process. Also, you cannot generate the report. If a configured field has no value, the file will be generated with the remaining constructs defined in the filename.
When the PDF file is generated, any configured Target Object Updates are also performed.
| If you want to generate the report using one template only once, define the Target Object Update to set a flag in the header record to indicate report generation. This flag can be checked in the qualifying criteria expression of the Output Document process to prevent the Output Document Delivery engine from being invoked once a report has been generated. |