Skip to content

Miscellaneous Web Services Quirks

Andrew Konchin edited this page Oct 28, 2019 · 9 revisions

General

  • The SOAP API uses the GUI logic. If you are getting a random error, try replicating the same operation in the GUI and see if you can get it to work. Often there are configuration options or scripts that will prevent you from being able to complete the task on the GUI side
  • Minimum pageSize for searching is 5
  • The phone field has a 21 character limit. This will cause a fatal error if not respected
  • The first name field has a 33 character limit. This will cause a fatal error if not respected
  • When running a mass update in the GUI, you will encounter some limits. For instance, mass updates have failed with "Failed with the following error message:" around the 40k mark
  • Get a list of all available operations: NetSuite::Configuration.connection.operations

Searching

  • "Note that a given entity is allowed to have two search IDs alive at a time. The oldest ID is expunged if a third is created. For SuiteCloud Plus users, a maximum of 20 search IDs are stored for a single SuiteCloud Plus user (two IDs per session x ten current logins). (For information on the SuiteCloud Plus license, see Enabling Web Services Concurrent Users with SuiteCloud Plus.)"
  • "Search IDs expire if they have not been used within 15 minutes after their creation. Passing an expired or invalid searchId will return search results with a “failed” status and StatusDetailCode=INVALID_JOB_ID." I have also gotten INVALID_SEARCH_MORE errors.
  • "Results may be missing. For example, if a record from the first results page is updated and it no longer fits the criteria, another record now fits into page one. However, because earlier pages are skipped when going through subsequent pages of search results, this record is not returned."

Tasks

  • If you assign a contact without a company on a task, creating the task will fail with Invalid contact reference key CONTACT_INTERNAL_ID for company <NULL>.
  • If you assign a contact with a company (customer) whose does not have you listed as a contact it will fail with Invalid contact reference key CONTACT_INTERNAL_ID for company CUSTOMER_INTERNAL_ID.
  • The ContactList field on a Task comes in as very strange XML when both a contact & a customer are specified. In the GUI, only customers are listed, but in the SOAP the assigned contact will be listed as well.

Sales Order

  • The custom_form field will effect what you can set other fields to. For instance, a custom form could filter certain items from the item list in the GUI. If you try to add those filtered items into the sales order via Web Services you'll get a missing item error (NOT a "this item is not available for this custom form" error... NS errors are often unintuitive and don't actually report what the problem is).

Customer

  • internalId on CustomerAddressbook records are handled differently that most internalIds on records.
    • it's an element, not an attribute
    • if you have a CustomerAddressbook's internalId and include it in your update call the internalId will not change on the CustomerAddressbook. If replaceAll is true this causes CustomerAddressbooks that have an internalId which matches an existing internalId to not be replaced.
  • It's impossible to get the entityID without the entity same concatenated to the ID via a get call. However, you CAN get to it through an advanced search.
  • You will get a DUP_VENDOR_NAME error regardless of Setup > Company > Setup Tasks > Enable Features (Administrator) on the Company subtab, Data Management section settings

API Versions

  • NS will change the XML structure without notice. The only way to reliably detect changes between versions is to diff the XSDs for various objects.
  • If something is randomly not working, or returning a completely illogical error message, don't worry. That's normal. Check the user groups to see if someone else has encountered the same error. It just might be a NS Web Services bug that they won't fix.