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

Advanced search column Account search does not parse fields from results #581

Open
sbudker-stripe opened this issue May 22, 2023 · 0 comments

Comments

@sbudker-stripe
Copy link

sbudker-stripe commented May 22, 2023

Problem: When searching accounts with specified columns we see a successful request and response from the SuiteTalk API but the gem does not correctly parse the response. Specifically we create the search result and populate the instance fields here If we get values returned in the search response which we don't have defined as a field on Account we don't populate anything for these.

Repro:

Make an example call like below for a instantiated client.

accounts = NetSuite::Records::Account.search(
        criteria: {
          basic: [
            {
              field: "isInactive",
              value: false
            }
          ]
        },
        columns: {
          "listAcct:basic" => [
            "platformCommon:internalId/" => {},
            "platformCommon:name/" => {}
          ]
        }
      )

Assuming results, see that accounts.results.first.name is nil while the Suitetalk XML response does populate this value. accounts.results.first.internal_id is populated because we have special handling see here and here.

Gem version: 0.9.3
SuiteTalk API version: 2018_1

Notes:

  • The fields defined on the Account model can be named differently than the results from the AccountSearchRowBasic fields.

  • This was discovered when improving search performance. This same issue may be applicable to other models within this gem.

@sbudker-stripe sbudker-stripe changed the title Advanced Account search does not parse all response search columns from results Advanced search column Account search does not parse fields from results May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant