Hi Curro, The safest way is to implement it in CBNodeDeleteSubclass. This function will always be called. The way it works is: If a node is deleted via the UI the llNode.NodeDelete is called. That function calls all the other llNode.NodeDelete* funcions. Somewhere in the middle it calls DAPI.DeleteNode DAPI.DeleteNode removes the node from the database, but it also removes all the child objects from the database. The only way that DAPI is able to execute any oScript code is by calling the callback functions. Hopes this helps. hans PS. The callbacks are set with Dapi.SetCallback -----Original Message-----From: eLink Discussion: Development Discussion [mailto:development@elinkkc.opentext.com]Sent: donderdag 22 januari 2004 12:28To: eLink RecipientSubject: Node Callbacks Node Callbacks Posted by IAEA_001User3 (Alcala-Soler, Francisco J) on 01/22/2004 06:27 AM Message from <F.Alcala-Soler@iaea.org> via eLinkHi, I have some questions about callbacks. I have a custom node on which I'd like to perform some adhoc database actions whenever it gets deleted. I have implemented such database actions in the LLNODE's NodeDeleteSubclassPre method and they work well whenever I delete an instance of the node. However, when the node is deleted because its parent folder has been deleted, the database actions in the above method do not get executed. I have seen that the only way (that I know of) to have those actions performed in all cases is to incorporate them in the LLNODE's CDNodeDeleteSubclass method. My questions are, a) Why is this so? Could anyone explain to me what are the major differences between both methods? b) Which one of them will also be executed if a delete the node from LAPI? Thanks a lot, Curro This email message is intended only for the use of the named recipient. Information contained in this email message and its attachments may be privileged, confidential and protected from disclosure. If you are not the intended recipient, please do not read, copy, use or disclose this communication to others. Also please notify the sender by replying to this message and then delete it from your system.
Hi Curro, You should not have the need to use DAPI.SetCallback. Internal in livelink there is a callback for delete registered. That callback function will call the llNode.CBDelete functions. Similar issues also exist for copy. The delete process is a litle bit more complex since the introduction of the Undelete functionality. Hans -----Original Message-----From: eLink Discussion: Development Discussion [mailto:development@elinkkc.opentext.com]Sent: donderdag 22 januari 2004 15:07To: eLink RecipientSubject: RE 2 Node Callbacks RE 2 Node Callbacks Posted by IAEA_001User3 (Alcala-Soler, Francisco J) on 01/22/2004 09:03 AM In reply to: RE Node Callbacks Posted by hstoop (Stoop, Hans) on 01/22/2004 06:53 AM Thanks, Hans.I didn't know that llNode.NodeDelete was only called for the first object and that all child objects would be deleted through direct DAPI calls. That explains why my method was not working when the parent was deleted from the UI. I will switch to the CB methods immediately.Regarding DAPI.SetCallback, when would I need to use it? For now I have orphaned my custom node from the CompoundDoc LLNODE in the LLIAPI Ospace and all the CB methods (copy, delete, move) show up nicely, so I only need to override them and add my functionality. What would I need DAPI.SetCallback for?Thanks again,Curro