[Product-Developers] Post-create update of a reference field
gilles.lenfant at ingeniweb.com
Thu Jun 11 09:21:43 UTC 2009
Le 11 juin 09 à 10:47, Andreas Jung a écrit :
> Hi there,
> following use case: an AT-Event derived content-type contains provides
> a "create sub-event" link within its default view. Clicking on the
> will create a new event and add the new event to a referencefield
> the original event (standard master-slave relationship). This works
> with invokeFactory() and updating the related fields within a
> browser view.
> However I want to use portal_factory in order to avoid orphan event.
> how to update the referencefield of the master event after the
> of the
> slave event through portal_factory?
Add a "def manage_afterPortalFactoryCreate(self)" method to your
custom event type, and play with it. Perhaps the latest versions of
portal_factory fire an event in that case.
See the source of the "doCreate" method of portal_factory.
More information about the Product-Developers