Line Items from Originating Object
5 min
populating line items from originating record fields you may have a number of fields on the originating record that you wish to populate various line items on the invoices this is possible, as long as you specify each and every individual line this is different from populating child records, where we iterate over each child record here, you specify the number of lines in each url the invoice url will start the same as always, using the basic custom url structure for invoice fields, where you can specify dates, etc however, the url will then specify line items, using the structure \&line# field= your field c button url \&line1 inventory name=name field c \&line1 description=description c \&line1 service date=service date c \&line1 quantity=quantity field \&line1 unit price=unit price field c \&line1 class=class field c \&line1 taxable=is taxable field c because your browsers or salesforce may have limits on the number of characters, breadwinner recommends this approach for just a few lines; it may work for dozens of lines or more, but try this at your own risk specifying more than one line should you want more than one line, you simply need to start with \&line2… and so forth button url \&line1 inventory name=name field c \&line1 quantity name=name field c \&line1 unit price=unit price field c \&line2 inventory name=name field c \&line2 quantity=quantity field \&line2 unit price=unit price field c \&line3 inventory name=name field c \&line3 quantity=quantity field \&line3 unit price=unit price field c populating data directly from the formula please be aware that this is particularly tricky and a missing “ can cause issues we recommend building these formulas up one line at a time this is possible with certain fields the quantity field accepts numbers when pulling data from specific fields on the originating record button url \&line1 inventory name=name field c \&line1 quantity=1 \&line1 unit price=unit price field c or, perhaps you wish to set the account revenue code or another similar field with text from the formula button url /apex/breadwinner qbo newinvoicepage ?originating record={!salesforce record id} \&parent account=api field name c \&invoice custom field 1=“text info a” \&invoice custom field 2=“text info b” \&invoice custom field 3=“text info c” \&child relationship name=child name r \&child object inventory name=name field c \&child object description=“text info x” \&child object quantity=quantity field \&child object unit price=unit price field c you may have a number of fields on the originating record that you wish to populate various line items on the bill/purchase order this is possible, as long as you specify each and every individual line this is different from populating child records, where we iterate over each child record here, you specify the number of lines in each url the url will start with /apex/breadwinner qbo newbillpo , using the structure taken from the basic custom url structure for bill fields, which lets you specify dates, etc however, the url will then specify line items, using the structure \&line# field= your field c button url \&line1 inventory name=name field c \&line1 description=description c \&line1 quantity=quantity field \&line1 unit price=unit price field c \&line1 taxable=is taxable field c notes \&line1 inventory name= name field c will not require if you are planning to map line items with account based line items \&line1 taxable= is taxable field c will not require for purchase order should you want more than one line, you simply need to start with \&line2… and so forth