No replies
345 Posts

Pinned topic How to invoke an update transaction form within another transaction?

‏2013-02-15T17:47:49Z |
We have a lot of cases were we need to call one update method from within another transaction.
For example, we would need to call updateAddress from our address component from within updatePerson of our person component.

So far we've handled this by using the TCRMClassFactory.getTCRMComponent(OTHER_COMPONENT) method and calling the update method on the returned component.

We have however noticed that the behavior differs from the cases were we call the update method directly on the controller.
There seems to be a lot of things missing that must happen on the controller level, like for instance loading the before image.

We also need this logic to happen when we invoke the update method.

Was is the correct way to handle this situation?
Should we call the update method via the controller?
If yes, how would we do this?