https://netsuiteprofessionals.com logo
#suitescript
Title
# suitescript
d

donaldtran

03/23/2022, 12:51 AM
FYI NetSuite changed
shipcarrier
to
carrier
within
salesorder
on loaded records . In the UI/Database/Saved Search, the field is still
shipcarrier
. the return values have not changed (still
ups
and
nonups
)
m

Mark C

03/23/2022, 7:58 PM
Can I ask how you found that? Records browser still shows 'shipcarrier' so I know you did some sleuthing. We are having issues with the 'source' field recently and 3 weeks of NetSuite Support being unable to figure it out makes me wonder if they changed that field in the non-UI/Search systems.
I see that in the field explorer plugin it says carrier now. They just haven't updated the records browser. And in the explorer, source is still source.
d

donaldtran

03/23/2022, 11:50 PM
I wrote a piece of code that finds when
shipcarrier
is FedEx (aka
nonups
) and it changes the shipping method to Standard Overnight based off criteria. This code broke and our automation failed. So I ran code line-by-line in my console until I found out that
.getValue('shipcarrier')
returned
undefined
instead of
''
. Then I found the Field Explorer Plug-in shows`carrier` while the UI / DB / Saved Search shows
shipcarrier
. This really reinforces the fact that Loaded Records are not exactly the same as the DB/Search.
For
source
ive found that source only has a value when data is present. And that value cannot be changed. But you can source that file. So we have salesorders created via a different
source
and then on our invoice we have a field called "Source of Created From" so we know if the salesorder was created via Web Services, CSV, etc.
What issues are you running into via
source
?
m

Mark C

03/24/2022, 3:25 PM
Literally returning no data when we pull the value from it. We're trying to add an "or" condition when orders come in from our SuiteCommerce webstore. Until recently, we could pull the actual value ("Web - <storenamehere>"). But now we get nothing. In saved searches, Source comes in as "Web". With NetSuite Support we've tried the actual value, "web", internal Ids... there's no value at all in there. I'm wondering if somehow it's getting populated after submit (We have a BeforeSubmit script) now. We can document this on multiple script tests. NS Support is stumped. We've got another zoom today to look at it. Same issue with other XML fields related to the webstore ({webstore}, {website}), There's no data at all when the script runs.
Just searched google and found this little gem: http://www.netsuiterp.com/2018/12/get-value-of-sales-orders-source-field.html They suggest reloading it after submit and running it... That's interesting.
But that issue seems to have come up with using multiple sites, which we don't. Sent it to NS anyway!
d

donaldtran

03/24/2022, 9:22 PM
Ive noticed that all Web Store records behave differently than you would expect. We have Online Case Forms where if someone submits it, a Case Record is created in NetSuite. However, whats janky about it is User Event BS and AS dont trigger during create. In fact, the flow is actually like this: User33 Submits Form > BS does not run > Case Record 77 Created for User33> AS does not run > ??? > AS runs for Case 77 on User33 but with context as delete > ?? > nothing runs We need to be able to BS/AS so we settled with running a Scheduled Map/Reduce to touch that new Case Record.
m

Mark C

03/25/2022, 6:46 PM
Ugh. I'm 99% sure that it's going to have to be AS for webstore only. Blows my mind that their own tech doesn't complete until after the fact. Testing a few things now but every keystroke feels painful that I have to 'fix' this.
2 Views