Line Item Level Fields
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 Line Items on 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 that we do not use the object's API name; we use the Child Relationship Name. This is because sometimes you will have multiple lookup fields from the child to the 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 one. 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 appending __r to that field, as this is best practice, but it is optional, as we will append it transparently if it is missing.
&child_relationship_name=child_name__r