Search code examples
documentumdfc

How to differentiate if a TBO is called when importing new Document vs for any other operations


We are trying to add one additional feature to our method for TBO. The feature needs to be executed only when a new document for that object type is imported and should not be executed in any other case like checkin checkout or any changes in attributes.

However the new code is getting called everytime we make any changes to attribute to that document. We have put that code in doSave() method.

I tried isNew method for distinguish between newly imported Document and other scenarios, however could not get success, may be missing the usage details of the method.

Can anyone suggest anything?

We are on Documentum version 7.2.


Solution

  • I always use isNew() method to check is object new or versioned, I don't remember having problems with it at any DFC version. Only one thing that comes in mind is to make sure you don't use super.doSave() while inside the code since right after it method will return false. But this is expected behaviour. If you really need to do this - some calulations based on programatically preset data - make sure you use value saved within local variable throughout your code.

    If you think you are experiencing bug with the method try with another DFC version or report a bug to the Support.