GenerateRecurring

Generates a journal from a recurring template.

Syntax

<IHsvJournalsEx>.GenerateRecurring lScenario, lYear, lPeriod, lTemplateID

Argument

Description

lScenario

Long (ByVal). The member ID of the Scenario dimension member.

lYear

Long (ByVal). The member ID of the Year dimension member.

lPeriod

Long (ByVal). The member ID of the Period dimension member.

lTemplateID

Long (ByVal). The ID of the journal template.

Example

The following subroutine creates a recurring journal. The subroutine takes the member IDs of the journal’s Scenario, Year, and Period dimension members and the label of the recurring template. HsvJournals.GetJournalTemplateItemID gets the template’s ID, which is then passed to GenerateRecurring.

Sub createRecurJnl(lScen As Long, lYear As Long, _
   lPer As Long, sTemplate As String)
Dim cJournals As HsvJournals, cJournalsEx As IHsvJournalsEx
Dim lTemplateId As Long
Set cJournals = g_cSession.Journals
Set cJournalsEx = g_cSession.Journals
lTemplateId = cJournals.GetJournalTemplateItemID(sTemplate)
cJournalsEx.GenerateRecurring lScen, lYear, lPer, lTemplateId
End Sub