Custom receiver type
The custom receiver type interface consists of the dom.get.destinations
function.
Syntax:
function long dom.get.destinations(
string i.doc.type,
string i.receiver.type,
string i.custom.receiver.type,
string i.receiver.value)
Description:
Use this function to add the destinations to the document.
Arguments:
i.doc.type: input argument which contains the document type
i.receiver.type: input argument which contains the receiver type
i.custom.receiver.type: input argument which contains the name of the custom receiver
type, if applicable
i.receiver.value: input argument which contains the receiver value as defined in the
report rule
Return value: xml node with the document, including the destinations
The <bic_dom>
include contains these supporting
functions, which can be used in the custom receiver type implementation:
- dom.init()
-
Syntax: function extern dom.init() Description: Initializes the document.
- dom.destination.new()
-
Syntax: function extern long dom.destination.new ( const string i.destination.type, [const string i.custom.code]) Description: Creates a new destination and adds it to the document created by dom.init(). This can be repeated to add multiple destinations to the document. Arguments: i.destination.type: input variable, which contains the destination type, use one of these values: DOM_DESTINATION_TYPE_EMAIL DOM_DESTINATION_TYPE_FAX DOM_DESTINATION_TYPE_PRINT DOM_DESTINATION_TYPE_CUSTOM i.custom.code: input variable, which contains the custom code, if applicable (optional) Return value: Returns an xml node containing the newly created destination or 0 (zero) if the destination could not be created.
- dom.destination.add.address()
-
Syntax: function extern void dom.destination.add.address( long i.destination, domain ttrpi.eatp i.address.type, const string i.address) Description: Adds a recipient for the given destination. Arguments: i.destination - The destination to add the address to, as created by dom.destination.new. i.address.type - Indicates whether the address is To, CC, or BCC. This must be specified for destinations with type email. For destinations with other types, it is not applicable. i.address - The address to add.
- dom.destination.set.address()
-
Syntax: function extern void dom.destination.set.address( long i.destination, const string i.address) Description: Sets the address for a given destination. Arguments: i.destination: input variable, which contains the destination created by dom.destination.new() i.address: input variable, which contains the address to set
- dom.destination.set.additional.address()
-
Syntax: function extern void dom.destination.set.additional.address( long i.destination, const string i.address, boolean i.is.bcc) Description: Sets the additional address for a given destination. This can be repeated to add multiple additional addresses to the destination. Arguments: i.destination: input variable, which contains the destination created by dom.destination.new() i.address: input variable, which contains the additional address to set i.is.bcc: input variable (true/false) to set whether the additional address is a bcc (blind carbon copy) or a normal cc (carbon copy)
- dom.get.document()
-
Syntax: function extern long dom.get.document() Description: Retrieves the document. Return value: Returns an xml node which contains the document. In case of an error, the function will return an xml node containing the error message.
- dom.errormessage.set()
-
Syntax: function extern void dom.errormessage.set(const string i.error.message) Description: Creates an error message for a document. Already added destinations will be removed. Arguments: i.error.message: input variable which contains the error message.