Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

What's the best way to support aggregate data structures using content types? For example, if I have an order processing system, then I might have data types like Order and OrderLineItem, where each Order may have reference to none or more OrderLineItems. How do I model this relationship with content types?

Do I base the Order content type on the built-in Folder type? Do I have separate content types where an OrderLineItem content type would contain a lookup field of an Order, and then heavily customized forms to render this on the Orders list?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Well, you can do parent child relationships with content types, where Order and OrderLineItem might inherit from Order Master, where Order master has all the common fields that Order and OrderLineItem contain. Then each of those content types have other columns unique to them.

Based on what your saying, I might have something like an Orders list that holds an orders content type. Then have a LineItem list that has the OrdersLineItem content type in it. That content type would have a lookup to the Orders list ID column or Order Number, what ever you're using as the "Primary Key".

share|improve this answer
    
Right, but what I'd like to accomplish is building a single form for the user where an order and all of its line items can be entered together. If I go the two-list route, then my order list forms and views would have to be pretty heavily customize, right? –  Ben Collins Nov 16 '11 at 19:10
1  
Somewhat for the new/edit forms, not so much for display forms. InfoPath might be a better option, then you can put in a repeating section for the line items, then promote what you need to to columns in the document library. –  PirateEric Nov 16 '11 at 19:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.