Get The SubType Of An Uploaded Object on AttrData.os

Hi,

I'm trying to get the SubType of an item during the upload process / create folder process in Content Server.
Example :
I'm uploading a new document to the server and I want to get it's SubType which is "144" as shown at the DTreeCore table during debugging on AttrData.os
located at core/LLIAPI/AttrObjects/AttrData.os
My goal is to do some manipulation on a category which will be attached to this file type (document). I want to verify that this manipulation only will be applied on object type 144 (document)
I did try to set a breakpoint on WalkData() function and search the received variables for SubType. The only data I get is of the category that I'm about to set.

Help will be appriciated.
Thanks!

Comments

  • it is probably best if you use the callback objects given by OT for this purpose. Callbacks are listed in the LLIAPI Ospace and you should see Create, BeforeCategoryUpdate, and AfterCategoryUpdate.Depending on your use case you should be able to do this much more cleanly. If you change or override AttrData.OS note that OT can change that code at some time and then your code sometimes may have to be requalified(I say that but again in true OOP if you override AttrData the new OT AttrData should be transparent to your code but it has happened to me sometimes when Ot developers change the signature/methods so what I wrote in 10.5 did not work in 16)

    There is plenty of examples Oscript callback code in the old Oscript forums, its debugging is tough for a newcomer so try to write or echo out things.

    If you want to first look at a WR Trigger and make it work the Trigger is an Oscript Callback.