My Stuff
Please note that on Friday, September 19, 2025, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 4 hours. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Comments
-
Thanks for this Jeff - I thought it was just me!
-
That, too, returns "Unexpected Error". But, since this is SS 2.0, line 0 does exist.
-
Sorry for the long delay here. I am doing mine on create, client-side, fired on the save record event. The record is indeed in dynamic mode and still presents the original error.
-
I believe that is a SS 1.0 call - not a 2.0 call.
-
I guess this is not a common issue. I will try paging chanarbon - any suggestions?
-
Thanks for the suggestions all. I just tried breaking out the "remove extra line items" to right before I save the record. Unexpected error. Eric - Thanks for your thoughts as well. I tried .toString(), all of the format.format and format.parse variations I could think of. Unexpected error. For the time being I have…
-
chanarbon - Good suggestion. I did try that earlier this morning and here is what I got for the field: {"id":"custbody_quantity","label":"Formula Quantity","type":"integer"} There are also no other scripts or workflows running on this record. Keep those ideas coming!
-
I've also just tried stripping the script down to exactly this: function beforeSubmit(scriptContext) { scriptContext.newRecord.setValue({ fieldId: 'custbody_quantity', value: format.format({ value: 999, type: format.Type.INTEGER }) }); } I get the same error - You have entered an Invalid Field Value 999.0 for the following…
-
So it turns out I did something foolish. For the record, david.smith & chanarbon are both correct. In my custom module I was trying to load a server-side-only module (ui/serverWidget). When trying to load this into the client-side I got the error. I was mis-interpreting the error message I was getting. Thanks all for your…
-
Good suggestion - but same error.
-
jejacob Thanks for the suggestion - but no luck. The record does not commit the changes due to the error message. michael Thanks for that tidbit - added to my toolbox! In all of the combinations I've tried I log out the value and it always displays as 1000 in the execution log. However the error always says that I'm trying…
-
Hi Jarod, Have you considered modifying the saved search to provide you the text of the unit of measure? You can then search against that. Another (semi-lousy) alternative would be to lookup the units from the item record. I feel your pain on this one!
-
Karen, I tried running your code in our account. I did get it successfully run, but I also found where your issue is coming from. There is an internal script referenced when you call request.parameters. The file seems to be the N/suiteletContext module. Here is where I think you are hitting the error, on line 54: 44 /** 45…
-
One last thought - put line 25 in a try/catch block.
-
You could add a line after 24 something to the tune of: if (!request) { return; }
-
Hi Karen, Can you post the full content of your script file? I tried copying and pasting your text here exactly and intentionally introduced an error on the line "var recid = request.parameters.caseid;" and the error said it was on line 15. However, the text you posted suggests that the error is on line 27.
-
Heard back from NS support today. Turns out this is a known defect and will be addressed in the 2017.1 release. So, if you're making an assistant with sublists, better stick to SS 1.0 for now!
-
I think you need to try .getCurrentSublistValue instead of .getSublistValue. So try this: var fieldValue = eventRecord.getCurrentSublistValue({ sublistId: 'custpage_eventsublist', fieldId: fieldId, });
-
chanarbon Thank you for the suggestion. I am running this on the GET after the user POSTs step 2. Per your suggestion, I tried putting the 3rd block of code on the POST side and the log shows this: Total Member Items: -1 So it doesn't seem to think there is anything on the sublist at all. Please keep the ideas coming :)
-
For reference, see the Help page titled "Result.getValue(options)" That was exactly what I was using as my guide. Per the link in my post above, if you look at the example that is provided it shows it as this: var value = firstResult.getValue({ colulmn: resultSet.columns[1] }); // get the value of the second column…
-
chanarbon I have tried as you suggested. Here is the code that I put on POST: if (lastStep.id == 2) { var step2 = assistant.getStep({ id: 2 }); var totalItemMembers = step2.getLineCount({ group: 'members' }); log.debug({ title: 'Total Member Items: ' + totalItemMembers }); for (var z = 0; z < totalItemMembers; z++) {…
-
Actually, I mis-spoke. I ran assistant.getLastStep().getLineCount({ group: 'members' )} and it returned -1. I just tried step2.getLineCount({ group: 'members')} and it returned 2. However, it errors out as before. I can get the item on line 0 but I error out when trying to get the item on line 1.…
-
Posting code is a very good idea. I should have thought of that. In this example let us assume I'm adding two sublist lines to the sublist "members". Setting up the assistant: var assistant = serverWidget.createAssistant({ title: 'Create a New Product', hideNavBar: true }); var step1 = assistant.addStep({ id: 1, label:…
-
Per your kind suggestion, I changed the code to: log.debug({ title: 'Customer', details: currentResult.getValue({column: salesResults.colums[0]}) }); And I received "Cannot read property 0 from undefined". I tried logging out salesResults.columns and it was empty. I then changed the code to this: var salesResults =…
-
Just added a line to log out currentResult and I see the following: {"values":{"GROUP(mainname)":[{"value":"432","text":"TEST CUSTOMER"}],"GROUP(customerMain.custentity_cust_rev_forec)":"36386.00","SUM(formulacurrency)":".00","SUM(formulanumeric)":"31035"}}
-
As a general update for anyone else facing the same issue, my ticket was escalated into a defect. I am awaiting investigation and will post the outcome of that investigation when complete. Thanks again to everyone who offered up suggestions!
-
Maybe a NS employee like chanarbon can help?
-
Check out the big brain on Darren! That worked! It should be noted then that the example provided in the NS API reference here is incorrect. For all those who come after us, the proper usage is Result.getValue(column) NOT Result.getValue({ column: column }).
-
darrenhillconsulting Happy to share the rest of the code, but there's not much more to be shared: var salesResults = search.load({ id: 'customsearch_starling_prog_rev_and_targ' }).run().getRange({ start: 0, end: 1000 }); var currentResult = salesResults[0]; log.debug({ title: 'Customer', details:…
-
jejacob - Right you are! I was confusing a record object with a currentRecord object. Thank you for this.