On Tue, Jun 28, 2011 at 15:27, Paul McNett <[email protected]> wrote:
> On 6/28/11 12:01 PM, Nate Lowrie wrote:
>> I have a parent bizobj for orders.  As part of the validation, I want
>> to check the child bizobj for order line items to see if at least one
>> line item exists, otherwise we will fail validation.  Is this
>> supported within the framework and if so, is there an easier way grab
>> the child bizobj than the getChildBizobjByDataSource method?
>
> In the parent bizobj's initProperties():
>
> """
> self.bizOrderLines = BizOrderLines(...)
> self.addChild(self.bizOrderLines)
> """
>
> Now you have an easy reference to the child.
>
> In the validation:
>
> """
> valid = self.bizOrderLines.RowCount > 0
> """

I have been handling all of the bizobj child connections in the Form.
This makes much more sense.  You recommend using the parent bizobj's
_connection property in the child constructor?

Regards,

Nate
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to