The DocumentIsNew function returns a value indicating whether the document (record) being written to a destination is new or is being updated.
Syntax
DocumentIsNew
Parameters
None
Return
value
A boolean. True indicates a new document is
being written to the destination. False indicates an existing
document is being updated.
Comments
You can use the
DocumentIsNew function in the Before Document, Before
Document Commit and After Document scripts.
Example
The following example is
the Before Document Commit script for a vendor integration. The
Comment 2 field is set based on whether a new vendor is being
written or an existing vendor is being updated.
If DocumentIsNew = True Then DestinationFields(“Comment 2") = “New vendor from IM” Else DestinationFields(“Comment 2") = “Updated by IM” End If