Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-record field results in saved search responses - Revised #470

Closed

Commits on Feb 13, 2021

  1. Clarify search row_list data components

    The "records" in the search group are hashes with "keys" that are the
    attribute names and "values" that the data returned by the search for
    those attributes (not necessarily the attribute values, though). For
    example, you'll often see things like this:
    
    ```
    {
      :department=>{
        :search_value=>{:@internal_id=>"113"},
        :custom_label=>"Business Unit"
      }
    }
    ```
    
    I think using `attr_name` and `search_result` instead of `k` and `v`,
    respectively, makes it clearer what the parts of this data constitute.
    davidlaprade authored and cgunther committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    800dfe7 View commit details
    Browse the repository at this point in the history
  2. Expose non-field search results within custom field list

    Sometimes NS makes information available within saved search results
    that are not record fields. For example, you can run an InventoryItem
    search through the GUI that returns:
    
    * `Location Available` (the quantity available at the default location)
    * `Location Reorder Point` (quantity at which you should reorder)
    * `Location On Order` (quantity on order for the location)
    
    These are not record fields, as you can see with a quick CTRL-f through
    the NS schema docs:
    
    http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2018_2/schema/record/inventoryitem.html
    
    They aren't custom formula results either (which NS doesn't seem to expose
    through the API).
    
    And they also aren't _custom fields_. This information is just default,
    standard-issue NetSuite. It's perfectly reasonable to have a search that
    returns them as results, and thus also reasonable to expect to be able
    to access them through the API.
    davidlaprade authored and cgunther committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    cb80a8f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0784733 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a853075 View commit details
    Browse the repository at this point in the history
  5. Restore extracting internal_id and support extracting external_id fro…

    …m search results after supporting non-record fields
    
    Since these aren't "fields" (they're plain ruby attributes), they were
    treated as non-standard fields and populated as custom fields.
    cgunther committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    763b77e View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2021

  1. Assign field name to script_id for API version 2013.2 and newer when …

    …treating non-standard search result fields as custom fields
    cgunther committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    6a0b418 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8e1b4f4 View commit details
    Browse the repository at this point in the history