Custom Guided Wizard
...
Button URL Structure
Line Item Level Fields

Populating Line Items from Originating Record Fields

6min

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, with the structure taken from 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


Internet Explorer, depending on the version, may have a limit of 2000 characters in the URL. Firefox and Chrome have potentially much longer URL limits, of 30,000 characters and up. Salesforce may have it’s own limits. We cannot be responsible for either your browser’s URL character limitation or Salesforce’s URL character limitation. As such, we recommend this approach for just a few lines, however, it may work for dozens of lines or more

Specifying more than one line

Should you want more than one line, you simply need to start with "&line2…" and so forth.

Button URL


Line Item Position

When you use both Child Object records (CURL) and Originating object fields (LI URL) as line items of an Invoice, then you can optionally provide the position of the LI URL line item, which is displayed as the first line item by default. You can directly give “first” or “last” text values to this parameter like below.

&lineitem_position=first or &lineitem_position=last

Based on this text, the order of LI URL records will be displayed on the Create Invoice page, and if you don’t provide the param, it will display the LI URL items first and then CURL records.

Button URL


Populating Data directly from the Formula

There are times you might want to specify data directly in the formula

Please be aware this is particularly tricky and a missing quotes“ 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


Or, perhaps you wish to set the Account Revenue Code or another similar field with text from the Formula

Button URL