NetSuite fetch list of countries internal ID's - netsuite

Is there a way in netsuite to fetch a list of countries with their internal id's ?
There seems to be pre-defined country list with both country codes and internal ids
https://netsuite.custhelp.com/app/answers/detail/a_id/71731/kw/country%20internal%20id's
Is it posible to load it as a record or search resault in a suitelet?

I don't remember where I downloaded the original list from, but here is a gist that I create a while back. It is for translating in the Jitterbit iPaaS, but it might be able to give you the data you need?
Jitterbit - Country/Country Codes to NetSuite Country Format

Related

NetSuite Saved Search (Bills, PRs, and POs by Vendor Containing Certain Text)

New to Netsuite and the saved search function, but I cannot for the life of me get these to show on the saved search together. I can get them to pull separately.
the PO and BILL record pull from one vendor record containing a certain text
the PRs pull from another separate field called the proposed supplier containing a certain text
How can I join these three transaction types on one saved search? I'm looking for the documents that contain a certain Text..
Screenshot of Criteria
PO and Bill are transactions, so you create a search on transaction and add filters to specified/required transaction types like Bill and Purchase Order. Although I could't understand what is PR.
And then you can add other search filter on the required field with operator contains, which has certain text as you mentioned.

Netsuite saved search for all contacts (Prospects, Customers) and leads

I have customers and prospects as companies and a lead can be individual or company. I need to create a saved search that returns all of the contacts of prospects, contacts of customers and all of the leads in one list. I can do a contact search where status = all available statuses and I get the primary contact of customers, primary contact of prospects and all leads (individual or company) If I add contact.name to the results tab, I get all contacts of prospects and customers but I lose all of the individual leads. I'm attaching image of the criteria and results field. This setup returns the primary contacts and all leads but I need all contacts. My goal is to get a list of every contact or lead in NetSuite to send to external system.
Do a Customer search with the following criteria:
USE EXPRESSIONS = YES
Contact : Internal ID is not none Or
Is Individual is true
In your results you can use a Formula(Text) to get the proper name and/or email:
decode({isperson},'Yes',{altname},{contact.entityid})
Finally heard back from support. It turns out you can tell NetSuite to treat individuals like contacts:
When you navigate to Setup > Company > General Preferences, you have there an option to SHOW INDIVIDUALS AS CONTACTS. When this feature is enabled, individual type customer records will now show in list of Contacts
You will need two separate searches to accomplish this. One for the Leads and one for the Contacts as these are two separate Tables in NetSuite.

Suitescript - How do I access the values in "Subsidiaries" sublist on vendor record?

On the vendor record, I need to loop over the Subsidiaries sublist through a scripted search, to get all of the values. I am specifically trying to find vendors that do not belong to a particular subsidiary.
UPDATE
To clear up my question, I was trying to access the Subsidiaries sublist and not the actual primary subsidiary. However NetSuite said that this is currently not possible and is a requested enhancement.
bluejay92, the vendor search has a join to the subsidiary record, see attach screen shot. You can even check "use expressions" to gain access to the NOT function in the criteria.
Workaround:
1 - Create a user event script that runs after the record is created/edited.
2 - Have the script load the record, get the subsidiaries and create a custom record to save the info so you can search it later.
3 - Export all vendors internal ids in 1 column. Run a CSV import of vendors and map internalid csv column to internalid field to trigger the user event script and populate the custom records.
Extra tip: Make sure the script does 'upserts' to the custom record to avoid duplicates. There should be one record per vendor.

NetSuite Site Category Count

Does anyone know how I can retrieve the NUMBER OF ITEMS in a category in netsuite?
I'm hoping for a getAttribute tag of some sort. I need the count of total items in order to create a pagination string url.
The simple method is to create a saved search with the criteria/filters you need.
You can create saved search either programmatically or by using the tools available in netsuite.
The length of the result of saved search will show the total NUMBER OF ITEMS.
NOTE : If you want, you can retrieve the entire details of each product from saved search results.

How to get data from report in netsuite using webservices request?

I want to get data from Reports-->sales-->Sales by Item Summary in netsuite.Can some one help me how to do this? Which type of record i have to request?
i´m having sales order report contains item,desc,qty and total revenue fields.i need to get these fields values to my application.How to do this integration? Is it possible can we get data from report like standard objects?
If you can get the same result using a saved search - create that saved search. Using a webservice call you can use 'Search' object to get the result from that saved search (parameter supplied is the value from saved search in the UI).

Resources