0
votes

Basically, what I need to do is get at the Billing Transactions:Internal Id field in a script for searching.

I have a saved Transaction search, where type = Purchase Order. I need to get the PO internalid AND the Billing Transaction: Internal Id. The saved search is fine.

Because in script the nlapiSearchRecord can only get one record, and I have over 9,000 rows, I am doing a loop where I am adding a filter of internalid >= the last internalId of the previous execution (1,000 rows). However, I need the filter for this search to be on the Billing Transaction:Internal Id NOT the PO Internal ID.

What "field" can I use in the nlobjSearchFilter creation to get the Billing Transaction:Internal Id?

1

1 Answers

0
votes

Using the NetSuite Records Browser, if you check the Search Filters section for Purchase Orders, there is a filter there called billingtransaction that you can use. There is also a Search Column of the same name, so you can also retrieve that in your results.

Another option, if you have a saved search and are comfortable with your script executing saved searches, you can simply pass the search ID to nlapiSearchRecord or nlapiCreateSearch to execute the saved search or modify it then execute it, respectively. We typically avoid doing this in our code because any Administrator can modify a Saved Search, even Private ones, but it is an option nonetheless.