Templates in the SmartClient are re-usable and can be created to define how your search results are displayed, which fields are updated, or which fields on new records receive data in NetSuite. Templates work much like the Results tab of a saved search in NetSuite; however, in the SmartClient, the results template is saved independently of the search so that you can apply it to multiple searches as needed.
Templates are often created in the process of creating a saved search or fetching records or transactions from NetSuite. You can also create templates in the process of adding records or transactions to NetSuite, or you can create templates independently to use for any of these purposes.
Use predefined templates from the Template Repository:
- If you would like to Add data and do not want to create your own template for Adding data, all you have to do is select from the list of templates that are in the Template Repository for SmartClient. To access the Repository, click on Add Records and select the Web Import option as below. Once, you choose the template you’d like, click on the download button next to the template. The template will automatically be copied into your local template collection and you can use it immediately for Adding records.
- If you would like to Get data from a record type and not necessarily go through the process of creating a template, you can click on Get Records and you will see the Web Import option as below
You can download the template for Get function by simply choosing the template you need from the below window:
To create a new template:
- If you are not creating the template in the process of a saved search, fetch, or add action, click the Result Templates button.
You can also create a new template from a list of searches by right-clicking a template name.
- To load the top left of the results table in the cell you currently have selected, check the Position Results? box. If you clear this box, data is loaded starting with the A1 cell.
Tip: Clearing this box is useful if you are sharing a template with other SmartClient users. You can do so by right-clicking a template in a list and choosing Export. A SmartClient table can remain with the NetSuite fixed headings while Excel macros or formulas pull and manipulate data from other worksheets. With the template already in place, you can then immediately push the manipulated data to NetSuite.
- To place search results in fields that already have data in your Excel datasheet without a warning, check the Overwrite Required Cells Without Prompting box. If you clear this box, you are prompted to approve the overwrite of data in cells that are needed for placing search results.
- If you used the Result Templates button, click Create New, and select a category for the type of template to create.
- Select which columns should be used to display your search results or should be used to enter data for new records or transactions that you want to add. Note the following tips:
- Double-click a field name or click the name and click the arrow to add or remove the field.
- Right-click a field name you have added to create a custom name to display as the column heading in the SmartClient.
- Drag and drop field names that you have added to re-order them on the right side.
- Click the Calculator icon to write an Excel expression for the data in this column. This is especially useful if you are creating the template to add data to NetSuite. When the template loads, this column fills in based on your expression. Some tips on using expressions in SmartClient templates:
- You can reference other columns in your template using the Quick Expression dropdown field in the Expression Editor popup. For example, to add the data from several columns together, you might enter =CONCATENATE( and then select Previous Column to show the relative expression for the column to the left. This automatically brings in INDIRECT(ADDRESS(ROW(),COLUMN()-1)). You can change the number in this expression to move over further to the left or right for other columns. Your end expression might look like =CONCATENATE(INDIRECT(ADDRESS(ROW(),COLUMN()-2)), “:”, INDIRECT(ADDRESS(ROW(),COLUMN()-1))).
- By default, an expression will run on all rows for the column. If there are rows where the expression should not calculate, you can use an IF statement to direct when the expression should calculate.
- Click Next.
- On the Select a Sub-List screen, you can choose to show data from one of the subtabs of the record or transaction you are searching or adding, and click Next.
If you do not need data from a subtab of a record or transaction, you can click This template does not require a Sub-List to remove any selections and skip this step.
- If you chose a sub-list to display, select the fields for the sub-list that you want to display.
Under Results Layout, choose to show the parent record or header information for a transaction once with sublist data listed below or to show the parent record or transaction next to every sublist entry.
Note: If you choose to show the parent or header information once, all rows without parent or header information are treated as one record or transaction.If you choose to show parent or header information for all rows and want to add line items or subrecords, you must have a column that shows a different transaction number or internal id. Entries with the same header or parent information are considered one record or transaction when added. For example, if you have:
- CustomerA, DepA, LocA, LineItem-1
- CustomerA, DepA, LocA, LineItem-2
- CustomerA, DepA, LocA, LineItem-3
- CustomerA, DepB, LocA, LineItem-1
- CustomerA, DepB, LocA, LineItem-2
LineItem-x is a sub list column, and because the first three rows are Department A, they are considered part of one transaction. The last two rows for Department B are considered a separate transaction.This does not apply when updating records, as the unique internal id is already stored for these records and transactions.
- Choose if you want this to be your default template, and click Finish.
Your template is now saved for future use. If you need to edit a template, you can click the Result Templates button. In the list of templates, right-click the name of the template on the right, and choose Edit.
You can also choose Make a copy… from the right-click menu to duplicate an existing template. You can then edit the copy for quick changes without having to rebuild a separate template.