This function is called by HotDocs to open the specified record in preparation for accessing it. The answer source should prepare the record for the type of access requested by the mode.
This function was introduced with the release of HotDocs 2005 SP2. Earlier versions of HotDocs will not call this function.
long OpenRecord ( long recordID, long mode )
Parameters | Description |
recordID | The record identifier (key) of the record to open.
HotDocs assumes that all record IDs returned by an answer source are greater than or equal to zero. That is, negative record IDs are not allowed. |
mode | The type of access requested for the opened record. HD_READONLY (0) for read-only access (GetField calls) or HD_READWRITE (1) for read/write access (SetField calls). |
Return HD_SUCCESS (1) if successful, and HD_FAILURE (0) if otherwise.
The following Visual C++ example returns HD_SUCCESS:
long WINAPI OpenRecord(long recordID, long mode)
{
MessageBox(NULL, "Click OK to continue.", "OpenRecord", MB_OK);
return HD_SUCCESS;
}