Custom Guided Wizard
...
Button URL Structure
URL Fields

Line Items Fields

15min
populating line items from child records it is possible for breadwinner to populate all of the line items of the sales order 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 may 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 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 you append “ r” to that field, as this is 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 netsuite requires an item in every line item also, please note that the field types must match item field will need either a direct lookup to netsuite item (either via a lookup or master/detail) or a formula field with the netsuite item salesforce record id quantity and rate are number fields ordering the line items you can fetch the child records in a particular order and send them to netsuite in the same order this can be referenced by another field on the child object button url \&co sort by=sort field c department this can be referenced either via another field on the originating object or as a text field in the formula so you may use either approach button url (field value) \&co department=dept api field c button url (static value) \&co department=123 class this can be referenced either via another field on the originating object or as a text field in the formula so you may use either approach button url (field value) \&co class=class api field c button url (static value) \&co class=123 button url \&co netsuite item=netsuite item field c \&co description=description field c \&co quantity=quantity field c \&co rate=rate field c \&co sort by=sort field c \&co department=department field c \&co class=class field c populating custom line item fields we designate a custom field on a line item by starting the line of the custom url as \&co cf, which is followed by the ordernumber (optional) and then the type of the custom field (i e text, date, etc ) followed by the api name of the netsuite field here is the theoretical construction button url (field value) \&co cf type netsuite api name=formula field c button url (static value) \&co cf type netsuite api name=123 add " type" (required) the type can be decided by checking the netsuite field type of the line level custom fields for more information, please refer to custom fields docid\ slaoavmc9hghpwuvjk 2w netsuite field type type value example date date \&co cf date netsuite api name=formula field c datetime datetime \&co cf datetime netsuite api name=formula field c list record (lookup) picklist \&co cf picklist netsuite api name=formula field c integer number integer \&co cf integer netsuite api name=formula field c decimal number number \&co cf number netsuite api name=formula field c currency number \&co cf number netsuite api name=formula field c percent number \&co cf number netsuite api name=formula field c check box checkbox \&co cf checkbox netsuite api name=formula field c free form text text \&co cf text netsuite api name=formula field c text area textarea \&co cf textarea netsuite api name=formula field c long text longtextarea \&co cf longtextarea netsuite api name=formula field c email address text \&co cf text netsuite api name=formula field c hyperlink text \&co cf text netsuite api name=formula field c add "ordernumber" (optional) button url (field value) \&co cf ordernumber type netsuite api name=formula field c the order number part in the button url syntax above determines the order in which the custom fields are displayed in the columns of the line item table if we have an order number, they will be displayed as per our preferences button url (field value) \&co cf 02 date custcol enddate=formula field c \&co cf 01 date custcol startdate=formula field c if no order is given, the custom field columns are added randomly or alphabetically button url (field value) \&co cf date custcol enddate=formula field c \&co cf date custcol startdate=formula field c note you can have a mixture of ordered and non ordered custom fields the non ordered ones will appear at the end 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 sales order/purchase order/bill 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 sales order/purchase order/bill url will start the same as always, with the structure taken from the basic custom url structure for sales order/purchase order/bill 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 netsuite item=netsuite item field c \&line1 description=description field c \&line1 quantity=quantity field c \&line1 rate=rate field c \&line1 department=department field c \&line1 class=class field c \&line1 location id=location field c \&testing=true 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 \&line1 netsuite item=netsuite item field c \&line1 quantity=quantity field c \&line1 rate=rate field c \&line2 netsuite item=netsuite item field c \&line2 quantity=quantity field c \&line2 rate=rate field c \&line3 netsuite item=netsuite item field c \&line3 quantity=quantity field c \&line3 rate=rate field c