Custom Guided Wizard
Button URL Structure
Line Item Level Fields
6min
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 buttonurl 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 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 the parent record, and we don’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 detail 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 you append " r" to that field, as this is the best practice, but this is optional because we will append that transparently if it is missing button url \&child relationship name=child name r specifying the child object fields as well as specifying the child object, you must specify fields on that child object most fields are optional, but xero requires a description in every line item also, please note that the field types must match you must use a date (or date/time which will be converted into a date transparently) for the service date field quantity and unit price are number fields (we accept up to 4 decimal places) for picklist fields (account revenue, tax rate, and tracking codes in xero) you must use fields that match, exactly, case sensitive to existing fields in your accounting system if we cannot find an exact match in your accounting system we ignore those fields if the xero inventory item (as specified by the child object inventory code ) does not exist in xero, we will transparently create it in the background this functionality is the same with the custom guided wizard, or when creating invoices with the guided wizard also, be aware that for xero, your tracking code(s) must be setup in xero before breadwinner can use them we cannot add new values to any of these; we are limited to populating these fields with values already in the accounting system the line items can also be organized in a particular order as specified by custom object sort by button url \&child object inventory code=inventory c \&child object description=desc field c \&child object quantity=quantity field c \&child object unit price=unit price field c \&child object discount=discount field c \&child object revenue account=rev field c \&child object tax rate=tax rate field c \&child object tracking code 1=code1field c \&child object tracking code 2=code2field c \&child object sort by=sort by field c all fields available for a new invoice with child records the list and structure of a button url with all possible fields, including those for line items that are drawn from child records, utilized is below please note that many of these fields will not work unless the corresponding field is setup in the accounting system button url /apex/bread winner newinvoicepage ?originating record={!salesforce record id} \&parent account=api field name c \&invoice date=invoice date api field c \&due date=invoice date api field c \&invoice reference=reference api field c \&child relationship name=child name r \&child object inventory code=inventory c \&child object description=desc field c \&child object quantity=quantity field c \&child object unit price=unit price field c \&child object discount=discount field c \&child object revenue account=rev field c \&child object tax rate=tax rate field c \&child object tracking code 1=code1field c \&child object tracking code 2=code2field c \&child object sort by=sort by field c \&testing=true