Commit 1af5545
Fix accessing custom field values returned in advanced search results (#480)
NetSuite seems to wrap values in a `searchValue` element rather than
just `value`, breaking the ability to access those values the same in an
advanced search as compared to either a basic search or simple `get`.
Previously, you'd access the value via
`my_record.custom_field_list.my_custom_field.attributes.fetch(:search_value)`,
and if it was a `CustomRecordRef`, you'd get a raw hash back, not an
instance of `CustomRecordRef`.
Now, you'd access the value via
`my_record.custom_field_list.my_custom_field.value`, so it's consistent
across `get`, basic, and advanced searches, plus you'd get an instance
of `CustomRecordRef`, where appropriate.
Co-authored-by: Michael Bianco <[email protected]>1 parent 4456ce2 commit 1af5545
File tree
4 files changed
+32
-6
lines changed- lib/netsuite
- records
- support
- spec
- netsuite/actions
- support/fixtures/search
4 files changed
+32
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
114 | 115 | | |
115 | | - | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 55 | | |
59 | 56 | | |
60 | 57 | | |
| |||
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
67 | 82 | | |
68 | 83 | | |
69 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
| |||
0 commit comments