HOWTO: Specify a Zetadocs template depending on company in GP
ZTN4068
ID: ZTN4068
This Zetafax technical note applies to:
- Zetadocs for GP v2.0
- Microsoft Dynamics GP v9
Summary
A template can be automatically applied to a GP report by hard coding the %%[Template: ] embedded command in Report Writer.
Users may want to apply a different template depending on which company they are logged into.
The Zetadocs template embedded command can be made dynamic by including the Global variable “Company Name” text string in the name of the template file.
More information
First create a calculated field which calls the company name
Result type: String
Name: ZDcompany
Field: Globals | “Company Name”
Create a calculated field for the Zetadocs Template:
Name: ZDTemplate
Result Type: String
Field: “%%[Template: “ # STRIP ( ZDCompany ) # “.zdt]”
You can specify more information if appropriate
E.g.
“%%[Template: \\machine-name\zetadocs templates“ # STRIP ( ZDCompany ) # “.zdt]”
“%%[Template: “ # STRIP ( ZDCompany ) # “ invoice template.zdt]”
Last updated: 14th December 2009 (JW/MW)