ANS-0918 · WEB SERVICES & INTEGRATIONS
How to Retrieve NetSuite Country ID and Name Mappings via Web Services?
Learn how to use a web services getSelectValue request to obtain a comprehensive list of country internal IDs and their corresponding names in NetSuite.
Short answer
To map NetSuite country IDs to their names, execute a web services getSelectValue request targeting the relevant custom field. This method retrieves the internalId numbers alongside their matching country names, providing a complete mapping for integration or reporting purposes. This approach ensures accurate data retrieval for country-specific information.
Scenario
Users often require a complete mapping of country ID numbers to their corresponding country names within NetSuite for various purposes, such as data integration, custom reporting, or external system synchronization. Manually compiling this list can be time-consuming and prone to errors, necessitating an automated and reliable method for retrieval.
Solution
To obtain a comprehensive mapping of country internal ID numbers to their respective country names in NetSuite, a web services getSelectValue request can be performed on the relevant custom field. This request targets a custom field (e.g., custentity123 on the customer record) that stores country information. The following XML snippet illustrates the structure of such a request:
<platformmsgs:getselectvalue"> <platformmsgs:fielddescription>
<platformcore:recordtype>customer</platformcore:recordtype>
<platformcore:field>custentity123</platformcore:field>
</platformmsgs:fielddescription>
<platformmsgs:pageindex>0</platformmsgs:pageindex>
</platformmsgs:getselectvalue>Executing this request will return a list of internalId numbers, each paired with its matching country name, providing the desired mapping.
Expert NetSuite Support
Need help with this NetSuite issue?
Web Services & Integrations consulting and configuration support
