Creates an HFMwJournal object from a given template, initializing the journal with the template’s data.
To save the journal, pass the HFMwJournal object returned by CreateJournalFromTemplate to SaveJournal. |
<HFMwManageJournals>.CreateJournalFromTemplate (bstrScenario, bstrYear, bstrPeriod, bstrValue, varbCreateAsAutoReversing, bstrLabel)A flag that determines whether the journal is auto-reversing. Pass TRUE to create an auto-reversing journal, FALSE otherwise. | |
The label of the template. If the label is invalid, an error is returned. |
Returns an HFMwJournal object reference.
The following subroutine creates and saves a new journal. CreateJournalFromTemplate creates an HFMwJournal object, using the template, Point of View, and auto-reversing flag passed to the subroutine. HFMwJournal.label sets the journal label, using the label passed to the function. SaveJournal then saves the journal.
Sub AddNewJournal(sScen, sYear, sPer, sVal, bAutoRev, _
sTemplate, sLabel)
Dim cHFMManageJournals, cHFMJournal
Set cHFMManageJournals = Server.CreateObject _
("Hyperion.HFMwManageJournals")
'g_cHFMSession is an HFMwSession object reference
cHFMManageJournals.SetWebSession(g_cHFMSession)
Set cHFMJournal = cHFMManageJournals.CreateJournalFromTemplate _
(sScen, sYear, sPer, sVal, bAutoRev, sTemplate)
cHFMJournal.label = sLabel
cHFMManageJournals.SaveJournal cHFMJournal
End Sub