-
-
Notifications
You must be signed in to change notification settings - Fork 278
Description
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.