0

I'm trying to create a Transactions Saved Search in NetSuite that is filtered for line items (Main Line = False) but I want to show a field from the main line that is not available in the dropdown of fields. The specific field I'm looking for is Payment Method (paymentmethod).

Here is a similar question, the requestor is trying to do the same with the Ship Date field. I tried Nathan's solution but it returns nothing. Presumably, that is because I'm trying to run an analytic function on a text field but I am not sure.

YoizFi
  • 3
  • 1
  • 3

2 Answers2

0

The Main Line field is automatically added on a transaction search. If you wish to remove it, you need add a Criteria: Main Line = False, then the line items will show up instead. Consequently, you can add Criteria: Main Line = True if you only want to show the header info of the transaction. This field is represented by the * column on your search results.

reddish
  • 9
  • 4
  • My search is intentionally limited to line items only but I want to pull a specific field - paymentmethod - from the related main line. Some fields can be pulled using the dropdown, for example: there's an option to show the Memo (Main) on the line item results. Numeric fields that are not shown in the dropdown can be added using ananlytic functions as shown in [this solution](https://stackoverflow.com/a/58716041/9185033). My question was specifically about text fields, how to get a text field that's associated with the main line to show on the item line result. – YoizFi May 14 '20 at 15:00
  • By Main Line > are you referring to the Header info? – reddish May 14 '20 at 20:33
  • Yes. See my comment on [Will's answer](https://stackoverflow.com/a/61829852/9185033), I actually realized this is not a formula issue and there seems to be a problem with this specific field on line items. In fact, other header level fields don't require a formula to be shown on the line level, whic I assumed was the case. – YoizFi May 18 '20 at 18:54
0

Nathan's solution works for me, but only when Main Line is not set to false. This is the formula I used:

MIN/*_*/({paymentmethod}) OVER (PARTITION BY {internalid})

A more complete solution would be to create a custom field that sources from the Payment Method field and use that in your saved searches instead. It should appear on each of the line item results without the need for a formula, and even with Main Line set to false.

I'm not sure why Payment Method is a special case in this regard.

  • When the Main Line is not set to false, I don't need the formula, I can choose Payment Method from the dropdown. You bring up a good point though that the fact that this formula works on the main line shows that analytic functions can work on text fields. I like your suggestion to use a custom field, this actually works and I'll upvote your answer for that. At this point I realize the problem isn't with the formula because I can get any main line field to show up on the line items without a formula and with a formula just the same, except this field doesn't show up either way. – YoizFi May 18 '20 at 18:42