Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Auto Store Relation with Add button

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 320 Views
  • Benwitz
    Avatar
    Community Member
    7 Posts

    Auto Store Relation with Add button Link to this post

    my structure in CMS:
    Order DOM shows OrderItem - shows only OrderItems in active Order
    OrderItem DOM shows ProcessStep - shows only ProcessSteps in active OrderItem

    When I 'Add ProcessStep' I would like the OrderItemID field to be filled in automatically. currently i create a ProcessStep and when I return to the OrderItem DOM I have to select the checkbox to make the relationship (ie store OrderItemID in ProcessStep). checking the checkbox is a repetitive step since i should be able to indicate the proper OrderItemID at creation.

    Is there a way I can tweak the 'Add ProcessStep' action to pass the ID?

    I tried using onBeforeWrite in the ProcessStep but I dont know how to refer back to the active OrderItem to get its ID.

    320 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.