Output doc PDF filenames

I do not currently see a config setting to control the format of the PDF attachment "file name" so it appears to be hard coded. Currently, the file name is saved to the server using this naming convention: <Output Document SFM Transaction Id>_<SFID of the header record>_<yyyyMMddHHmmss> when generating a report PDF. For example: Field_Service_Report_a1LJ0000001jGzEMAU_20141021095745.pdf

Can this be configurable? This would be similar to using the ServiceMax Setup --> Event Subject rules which allow you to define the format of the Event Name based on defined rules. pdf‌ outputdocs‌

What is the underlying problem do you intend to solve with this idea?
-
How is the problem being addressed today, if at all?
-
Product Area?
Communities
What version of ServiceMax are you on?
Summer 16
17 Comments
Pastry Chef
Pastry Chef

With the ServiceMax mobile client for laptops it did work. However, with the new field service client for windows which also has a download button it seems to break the link between the mobile client and the attachment online. Even after a reset application non of the existing attachments could be downloaded in the field service client. Currently a support case has been created for this and pending investigation and feedback if servicemax now supports to configure the file name for the attachment it generates in the service report.

Grill Chef
Grill Chef

To be able to configure what the filename will be when the document is created seems to be a fundamental requirement to me and I would certainly like to see this in ServiceMax. It does not look professional to have an ID in it - I could just about go with the date time although that could be formatted better.

Roast Chef
Roast Chef

theres an apex workaround listed in one of my above comments - we also had this requirement from customer-facing standpoint - code can be changed to whatever naming convention you would like customer to see

Grill Chef
Grill Chef

The apex code is referring to emailing an attachment – I would like to try this for a document that is created from an SFM in the browser (not mobile) and attached to a wo so I need to create a trigger that will fire when the document is attached but I am not sure how to do this.

Gill Cook

Database/Systems Developer

Tel: +44 (1223)577941

email: gill.cook@incadigital.com<mailto:gill.cook@incadigital.com>

Roast Chef
Roast Chef

hmm, yes that would be different set of code, you are correct

I have played around with triggers on Attachment object, but never had much luck - always corrupted the merge process for our email-out trigger i mentioned above - Jeroen Schwankhuizen​ seems to have had better luck, however

You could create a scheduled job that looks for Attachments created within last [24] hours and run it each night?  Or hourly depending on timeline needs.  Obviously not ideal, but would potentially get the job done in the interim

Line Chef
Line Chef

It should work if we make the required Name change in Before Insert event of the Trigger. Have you tried that part ?

Roast Chef
Roast Chef

I only played with the triggers for other reasons, so no - but that is a great point, believe that would do the trick!!

Wouldn't be a difficult trigger to write either - just make sure to double check everything, dont want any errors preventing attachment/delivery of customer-facing documents