This function is called by HotDocs to determine what type of access is allowed for a field in the answer source, and only if the Unicode version of this function (GetFieldAccessW) is not defined. Access may be read-only, or read/write, meaning answers can be written back to the original record if they are changed during the interview.
This function was introduced with the release of HotDocs 2005 SP2. Earlier versions of HotDocs will not call this function. If you need HotDocs to pass a Unicode string to this function, use GetFieldAccessW.
long GetFieldAccess ( LPCSTR szFieldName )
Parameters | Description |
szFieldName | The name of the field that is to have its value retrieved. |
Return HD_READONLY (0) if only read access is allowed, or HD_READWRITE (1) if both read and write (back-fill) access is allowed.
The following Visual C++ example returns asks if read/write access is allowed:
long WINAPI GetFieldAccess(LPCWSTR szFieldName)
{
if (MessageBox(NULL, "Is read/write supported?", "GetFieldAccess", MB_YESNO) == IDYES)
return HD_READWRITE;
else
return HD_READONLY;
}