Publishing Templates
Once a template is created, publishing is a 2-step process:
Step 1: Create a Document Record
1. Click the Documents tab and select any folder where you want to save the templates. The default templates of ServiceMax are available in the ServiceMax Documents folder.
2. Click New Document to view the Document Edit screen.
3. Enter a user-friendly name for the document. This is the name that will be listed for users to select from.
4. Check the Internal Use Only checkbox.
5. Select the appropriate folder.
6. In Description, enter the object name using the format "NamespacePrefix.ObjectName.RecordType." For example, if the template you built corresponds to Shipments, enter "SVMXP.RMA_Shipment_Order.Shipment". This is to make sure that you have the flexibility to define templates for various record types in an object. If your object does not have a record type, use only the Namespace prefix and Object name. For example, to identify a template built on the Stock Transfer object, use "SVMXI.Stock_Transfer".
7. In Keywords, enter the name of the Visual Force page you created.
8. Click Save.
Repeat the above steps for as many templates as your organization needs. If you are building templates in more than one language, create separate document folders for each language, and grant folder access to only the appropriate users. A sample document record entry is shown below:
Step 2: Create a custom button or link to launch ServiceMax Mail Merge Page
This must be done for each object, if not already present. To do this:
1. Navigate to Setup > App Setup > Create > Objects and then click the object for which you created templates.
2. Create New Custom button/link by following Steps 3 - 10 below.
3. Enter a suitable name for the label. Recommended practice is “Object Name Report(s)”. For example, for RMA-related templates, the button/link label could be RMA Report(s.)
4. In the Behavior picklist, click Display in existing window without sidebar or header.
5. Select URL for Content Source.
6. For the button content, use the syntax given below. The area highlighted must be used exactly as shown here: /apex/SVMX_Select_VF_Template?id=YourObjectId&ObjName=NameSpace.ObjectName.RecordType
7. Specify the Salesforce merge variable name for the id parameter.
8. Specify the Document description for the ObjName parameter.
9. For example, the URL for RMA reports will be: /apex/SVMX_Select_VF_Template?id={!SVMXP__RMA_Shipment_Order__c.Id}&ObjName=SVMXP.RMA_Shipment_Order.RMA
10. Click Save.
11. Add the custom button/link to the page layout. A sample custom link is shown here:
Was this helpful?