Hello Awesome Trailblazers,
I am looking for a solution that allows me to automate the naming convention of the Field service reports PDFs. Currently it’s some random numbers and V1-V2 if there are any versions.
My goal is to make it something like this: Workorder number, Subject and Date completed.
Ex-123,PMI 20261027
Appreciate the wonderful suggestions.
#Salesforce Field Service
Hi @Suresh G,
You can do this with a Record-Triggered Flow on Service Report (run after the record is created).
- Get Records: get the Work Order using {!$Record.ParentId}.
- Get Records: get the Content Version using {!$Record.ContentVersionDocumentId} and note its ContentDocumentId.
- Formula for the new name:
{!Get_WO.WorkOrderNumber} & "," & {!Get_WO.Subject} & " " &
TEXT(YEAR({!Get_WO.EndDate})) &
LPAD(TEXT(MONTH({!Get_WO.EndDate})), 2, "0") &
LPAD(TEXT(DAY({!Get_WO.EndDate})), 2, "0")
Update Records: update the Content Document and set Title to this formula.
Note: Work Order has no standard “completed date” field, so use EndDate or your own date field. Test in a sandbox first.
Hope this helps. If it works, please mark it as the best answer.