Custom Guided Wizard
Button URL Structure

Line Item Level Fields

3min

Populating Line Items from Child Records

As you may know, when Breadwinner creates a new Invoice from Opportunities with Opportunity Products and Order with Order Products, Breadwinner auto-populates the Invoice Line Items from the Opportunity Products / Order Products. This works with no configuration. 

It is equally possible for Breadwinner to populate all of the Line Items of the Invoice from custom objects, provided a Custom URL Structure is used.

This requires two things: specifying the child object and specifying the fields on that child object to use. 

You can iterate over only one Child Object, i.e. you must pick one and only one Related List to iterate over, not two or more related lists. And, as of now, we do not have the ability to iterate over a subset of those child records; you must iterate over all of them or none of them

Specifying the Child Object

Please note, we do not use the API name of the object, we use the Child Relationship Name. This is because sometimes you will have multiple lookup fields from the child to parent record, and we won’t know which one to use. Thus, you must specify the child object by using the Child Relationship Name.

The Child Relationship Name can be tricky to find. In setup, go to the child object, and click on the name of the lookup field (or master/child field) to the parent object. If you have two or more lookup fields to the same parent object, make sure you select the right now. After clicking the name of the lookup field to the parent object, you will be on the setup page of that field. 

You will see the Child Relationship Name field. We recommend you append __r to that field, as this is best practices, but this is optional because we will append that transparently if it is missing.

Button URL