Closed steveklett closed 3 years ago
Yes, another NetSuite-ism. The easiest solution here it to make that a string or perhaps string | number
in case NS silently changes how that select works...
Another temporary workaround would be
newRec.shippingaddress.country = getCountryById(230)!.abbrev as any
I plan to make the change and submit a PR, operative word is 'plan' I didn't realize you could cast to any like that, much cleaner, thanks for the tip. Hope all is well with you. :)
Aye, use any
as a last resort, but once in a while you have no other
great choice. You could probably also cast to unknown
then to number
but that's even more confusing.
On Sun, Feb 28, 2021 at 12:33 PM Steve Klett notifications@github.com wrote:
I plan to make the change and submit a PR, operative word is 'plan' I didn't realize you could cast to any like that, much clean, thanks for the tip. Hope all is well with you. :)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ExploreConsulting/netsuite-fasttrack-toolkit-ss2/issues/49#issuecomment-787518075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKFNA3DTQYP4VUAGBBIDRDTBKSADANCNFSM4YLMDOOQ .
should be resolved in 6.0.0, reopen if needed
When setting the country property on an Address subrecord I'm getting error:
I've verified that it's the abbreviation value (e.g., 'US') that is required. The NetSuite record browser states this field is a select, and it is, but why it won't take an IID I cannot say. The workaround is to hit the underlying ns record instance like so: