This topic contains 12 replies, has 0 voices, and was last updated by al3xicon 8 years ago.
-
AuthorPosts
-
November 2, 2016 at 11:41 am #1587
darrenhillconsultingAnyone ever create a ‘deposit’ record in Netsuite before? I’m not able to use dynamic mode, which I think is messing up a bunch of other fields.
Any tips and tricks for those experienced with doing one? I’m in a trial and error LOOP!
This is a cached copy. Click here to see the original post. -
November 2, 2016 at 11:52 am #1588
darrenhillconsultingMaybe its an SS2 thing .. I did the exact same thing in SS1 and it worked.
I get this error in SS2
“type”:”error.SuiteScriptError”,”name”:”UNEXPECTED _ERROR”,”message”:”ReferenceError: “document” is not defined. (NLRecordScripting.scriptInit$lib#309)”,”stack”:[“anonymous(N/recordService)”,”(/SuiteScripts/DH/Integration/Deposit/DH_Deposit.js:53)”],”cause”:{“type”:”internal error”,”code”:”UNEXPECTED_ERROR”,”details”:”Refere nceError: “document” is not defined. (NLRecordScripting.scriptInit$lib#309)”,”userEvent “:”aftersubmit”,”stackTrace”:[“anonymous(N/recordService)”,”(/SuiteScripts/DH/Integration/Deposit/DH_Deposit.js:53)”],”notifyOff”:false},”id”:””,”notifyOff”:false}
For the record, line 53 of my script is the ‘save’
-
November 2, 2016 at 11:53 am #1589
david.smithI’m assuming you mean the “customerdeposit”? What seems to be the issue?
-
November 2, 2016 at 11:57 am #1590
darrenhillconsultingAll I did was set the class/department and set ‘deposit’ to true on the first line of the ‘payment’ sublist. Should work fine as a PoC. Is this a Netsuite bug in SS2?
-
November 2, 2016 at 12:36 pm #1591
darrenhillconsultingOriginally posted by david.smith
View Post
I’m assuming you mean the “customerdeposit”? What seems to be the issue?
Actually no, I mean ‘deposit’. I’ve built an integration that is receiving bank deposit information, and I’m building a Netsuite deposit based on its information. It’ll be pretty sweet. But man .. this bug! Please say I don’t have to revert back to old school SS1
-
November 2, 2016 at 3:15 pm #1592
david.smithSo you mentioned you couldn’t do dynamic mode? Can you post a code snip?
-
November 2, 2016 at 8:55 pm #1593
chanarbonHi Darren,
Does this only happen to new records or does this concern happen as well on loading the record and saving it and performing record.submitFields()?
-
November 3, 2016 at 6:32 am #1594
darrenhillconsultingI’m going to spend an hour building out simply use cases using ss2 and ss1 and will post the results here. Chanarbon. I’ll include trying to ‘edit’ an existing deposit as well as using record.submitFields().
-
November 7, 2016 at 9:17 am #1595
darrenhillconsultingSo, here we go. Very simple test case.
SS1.0 code works fine …
Code:
var deposit = nlapiCreateRecord(‘deposit’);
deposit.setLineItemValue(‘payment’, ‘deposit’, 1, ‘T’);
nlapiSubmitRecord(deposit);
SS2.0 throws an errorCode:
var deposit = record.create({type: ‘deposit’});
deposit.setSublistValue({sublistId: ‘payment’, fieldId: ‘deposit’, line: 0, value: true});
deposit.save();
โ
The error being …{“type”:”error.SuiteScriptError”,”name”:”UNEXPECTE D_ERROR”,”message”:”ReferenceError: “document” is not defined. (NLRecordScripting.scriptInit$lib#402)”,”stack”:[“anonymous(N/recordService)”,”(/SuiteScripts/DH TESTS/depositTest.js:15)”],”cause”:{“type”:”internal error”,”code”:”UNEXPECTED_ERROR”,”details”:”Refere nceError: “document” is not defined. (NLRecordScripting.scriptInit$lib#402)”,”userEvent “:null,”stackTrace”:[“anonymous(N/recordService)”,”(/SuiteScripts/DH TESTS/depositTest.js:15)”],”notifyOff”:false},”id”:””,”notifyOff”:false}
I’m praying I’m simply doing something wrong … otherwise, what gives?
-
November 7, 2016 at 9:51 am #1596
erictgrubaughMy immediate reaction is that this has to be a 2.0 bug; somewhere in the 2.0 code, a reference to `document` is leaking. Probably some code that they are expecting to run client-side that is being executed server-side, where there is no `document`. I can’t see anything that you should be doing differently on your end.
-
November 7, 2016 at 10:35 am #1597
darrenhillconsultingI’m in agreement with you Eric, thanks for chiming in.
-
November 16, 2016 at 7:14 pm #1598
darrenhillconsultingSo, Netsuite has acknowledged this is a bug .. server-side. The work around is either Client scripts or SS1.0. See Defect # 418131.
Arg. SS1.0 it is!
-
November 17, 2016 at 7:21 am #1599
al3xiconSigh…of course it is.
-
AuthorPosts
You must be logged in to reply to this topic.