DeleteTemplates

Deletes one or more journal templates.

Caution!

The user must be assigned to the Journals Administrator role, otherwise error number 40D (hexadecimal) will occur.

Syntax

<IHsvJournalsEx>.DeleteTemplates vararlTemplateIDs, pvararnRc

Argument

Description

vararlTemplateIDs

Long array (ByVal). The IDs of the templates to be deleted. Use GetJournalTemplateItemID to get template IDs; for more information, see GetJournalTemplateItemID.

pvararnRc

Variant array. Returns codes that identify the success or failure of the template deletions. The elements in this array have a one-to-one correspondence with the template IDs passed in the vararlTemplateIDs argument. Successfully deleted templates return 0.

The array is returned as an Integer subtype.

Example

This example deletes a template named TempUsAdjs. The example gets the template ID with a call to GetJournalTemplateItemID, then passes the ID to DeleteTemplates.

Dim laID(0) As Long, vaRetVal
laID(0) = m_cHsvJournals.GetJournalTemplateItemID("TempUsAdjs")
m_cIHsvJournalEx.DeleteTemplates laIDs, vaRetVal