Article Details
Id: | 11127 |
Product: | finPOWER Connect |
Type: | NEW |
Version: | 1.06.08 |
Opened: | 19/04/2013 |
Closed: | 17/05/2013 |
Released: | 28/05/2013 |
Job: | J011483 |
Documents; HTML type Documents can now specify a 'template'
HTML type Documents can now specify a 'template' which can then be used in the Document's Script instead of building the HTML internally.
The following sample shows a simple tag substitution HTML Document using a new method in finDocumentFunctions to ensure values are HTML encoded:
Dim DocumentId As String
Dim strTemp As String
' Assume Success
Main = True
' Handle Events
Select Case eventId
Case "Publish"
' Get Document Id
DocumentId = DirectCast(parameters, ISKeyValueList).GetString("DocumentId")
' Pick up template
strTemp = finBL.Documents(DocumentId).TemplateDocument
' Replace tags
Main = finBL.DocumentFunctions.ResolveTaggedMessageHtml(strTemp, Now.Date, text, "L10000")
End Select
NOTE: This is a highly simplified version of an HTML Document and does not cater for any Document Parameters or when publishing the Document from a Log.
If the Document does not have a Script and is being published via an Account, Client or User Log, a simple tag replacement will be made in the HTML generated.