Yeah I've noticed^^ It has some powerful elements ...
# suitescript
f
Yeah I've noticed^^ It has some powerful elements but trying to make it feel modern is hard^^
s
FWIW we've built multiple SPA's for NetSuite.
f
Did you mix netsuite UI components with custom or just created your full blown custom UI widget suite for that purpose?
s
We've done full blown AngularJS and Aurelia mini-apps backed by Suitelets as a pure backend data layer. Works much faster than typical NS pages and you have full creative flexibility on the look and feel.
(hosted inside netsuite)
f
Yeah thats probably a lot easier^^ But for my usecase a full blown SPA is overkill. And so far I only needed two little DOM hacks to accomplish what I need^^
s
if it's really small then hack away!
f
The only thing that really annoys me is the inconsistency that Netusite APIs are working at. Custom fields can not be searched for when I use type BILL_PAYMENT but when I use type TRANSACTION i can. Even tho the custom fields are dedicated to bill payments and stuff like htat
s
oh, that's an entirely separate issue I think. Not knowing all the details, I think you were talking about transaction statuses? Well depending on what field you're looking at the transaction status is a unique set of values for each type of transaction (e.g. billpayment is different values than salesorder). I know that was a big issue in SS1 but can't remember if they've smoothed that over in SS2 or not
f
no its a custom field I've created
and other issues are sometimes you can not assemble field names dynamic as it throws an error
then you need to do workarounds like search API to work around it
s
the field name dynamic thing should work. I suspect your string concatentation wasn't actually getting a string for the dynamic part
you might try adding a
_.isString()
check on that dynamic part of the field name you were constructing
f
it was I even assembled it into a var and run typeof
and it was a string
s
and/or
_.toString()
on it before concatenation
f
as soon as I called
createFilter
with string cocatination it worked^^
s
If you have the code handy to paste here I'll think about it a bit more, but I know I've used dynamic field names because NFT actually depends on it.
can you paste the bit that didn't work?
I hate seeing 'createFilter` when an elegant search filter syntax expression should suffice
f
I fixed it with the object filter syntax which works
I removed already the old code sorry
s
ok, so your dynamic field name creation works?
f
yes just with workarounds