getDocForExportTemplate
Exports items to a Microsoft Word document using a specified export template. A SOAP error envelope is returned if the operation fails.
To export a specific requirement document, use getDocForExportTemplateReqDoc. To export items from a specific folder, use getDocForExportTemplateFolder.
Items in the resulting Word document are sorted by number. If items are specified by record ID, they are sorted in the same order as in the recordIDs parameter.
Parameters
| Parameter | Type | Description |
|---|---|---|
| cookie | long | Session cookie returned by projectLogon. |
| templateID | long | Word export template record ID. The record ID is displayed in the Configure Word Export Templates dialog box in Helix ALM. Use 0 if using templateName. |
| templateName | string | Word export template name. Leave empty if using templateID. |
| tablename | string | Table name to retrieve information from. Valid values: Defect, Test Case, Test Run, Requirement, Requirement Document, and Folder. Use getTableList to retrieve a list of available tables. Required. Must also use filtername, query, or recordIDs parameter to narrow items to export. |
| filtername | string | Filter name to apply to the items retrieved from the table. Set as an empty string to use no filter. Use getFilterListForTable to retrieve a list of filters for the table. Interactive filters are not supported. |
| query | string | JSON query string with restrictions to filter the items. See Creating and validating JSON queries for the getRecordListForTableWithQuery operation. |
| recordIDs | long[] | Item record IDs from the table. Set as an empty array to not use record IDs. |
| timezoneID | string | Internet Assigned Numbers Authority (IANA) time zone identifier to use for the export (e.g., America/New_York). Identifiers in the IANA Time Zone (TZ) Database are supported. To easily find an identifier, perform a web search. If an identifier is invalid or not specified, the hoursBetweenLocalAndGMT value is used. |
| locale | string | Common Locale Data Repository (CLDR) locale to use for the export. Use the two- or three-letter ISO 639 language code followed by an underscore and the uppercase two-letter ISO 3166 country/territory code. (e.g., en_US). If a locale is invalid or not specified, the locale set on the computer hosting the Helix ALM Server is used. |
| hoursBetweenLocalAndGMT | double | Difference in hours between the time zone to use for the export and GMT. For example, the Eastern Standard Time (EST) value is -5. Not used if a valid timezoneID value is specified. |
Return value
| Value | Type |
|---|---|
| pDocument | CFile |
Example
string query = "{'Type': ['Crash - Data Loss', 'Crash - No Data Loss']}";
CFile doc = ttsdk.getDocForExportTemplate(cookie, 42, "", "Defect", "", query, [], "America/New_York", "en_US", -5);
mySaveFileAttach("MyDocExport.docx", doc.mpFileData);