Rename Document file with a custom attribute

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

Parents Reply Children