Hi,
I have a custom attribute called file ID and it is uniqe, I wont to use this attribute's value to be as the name of document file. once user clike ssave in properties page.
I used "AAHOOK_UPDATE_LINK_DATA"
LONG AAAPIHOOK Hook_PreModifyDocument2
(
LONG *hookId*/,
LONG /*hookType*/,
AAPARAM aParam1,
AAPARAM aParam2,
AARESULT* pResult
)
{
if (aParam2 != AAOPER_DOC_UPDATE_LINK_DATA)
return AAHOOK_SUCCESS;
LPAADOC_PARAM pProParam = (LPAADOC_PARAM)aParam1;
if (pProParam->lDocumentId != 0)
the problem is LPAADOC_PARAM dose not return the correct Document ID.
any Idea?
Regards
Ghazi
I found an example that I use for a hook:
// Define variable to point to aParam1 for simpler use
AADOCCREATE_PARAM* projectParam = (AADOCCREATE_PARAM*)aParam1;
Try using this type of declaration for your PARAM variable.
Which hook are you setting ( i.e. AAHOOK_MODIFY_DOCUMENT ) in your aaApi_addHook call?