My Stuff
Going to SuiteWorld? Connect with SuiteGurus—Your NetSuite Product Experts!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
Comments
-
Thanks. Perhaps you missed my replies above. It works.
-
So I've changed it to this, but it still only works on edit, not create. I can't get my tired head around this one. function userEventAfterSubmit(type) { var recID = nlapiGetRecordId(); var rec = nlapiLoadRecord('salesorder', recID); var sendemail = nlapiGetFieldValue('custbody40'); if (sendemail == 'T') {…
-
var vend = nlapiGetFieldValue('vendor.inactive') if(type == 'copy' && vent = 'true') one is vent, one is vend...
-
It should track them. Is the original message showing on the customer record?
-
Can you use the customer internal ID instead of the string email address in the "To"? There was a limitation regarding that and tracking, but I can't remember the details. Ah yeah, that's right. I had the same issue when setting this up. Internal ID worked.
-
You could possibly put your script as an inline html field on the website sales order form.
-
Got the script to work. -R What was the error/solution?
-
In addition, can anyone point me to a place where I can find internal id names for fields when they are NOT available in the UI? :confused: https://system.netsuite.com/help/helpcenter/en_US/RecordsBrowser/2013_1/index.html
-
Client side my initial script works. It's doesn't work server-side though.
-
Update: I have attached the same item script as a user event on the item record. That did not change the price. Instead, I get this: You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist.…
-
Thanks for trying. No matter what I do I get that same error. I guess it just can't be done.
-
Hey Brett Completely pst trying to look through code that's not exactly going to do what I need, so could you explain something to me? If nlapiSelectLineItem/nlapCommitLine item calls are not what I should be using, which commands are the ones I should be using? Or where is this in the help guide? So confused... eg, if I…
-
Yep. Must be to do with pricing not being available to script outside of the item record itself. If I remove setting the price levels and leave the line to update the custom field, the custom field does get updated. Well, from a direct edit anyway, still not from the purchase order. I guess this just won't be possible.…
-
Yeah so, um, yeah, I'm lost...
-
Hi Wiz, You might want to check out this thread regarding updating prices. The nlapiSelectLineItem/nlapCommitLine item calls are used for client side scripts or server scripts where the record was loaded in dynamic mode. For your example I'd tend to make the code run after submit on the PO user event or before submit on…
-
I'm just trying to run server side so I can have the best of both worlds. No point updating the cost price form the PO if it doesn't trigger my pricing script.
-
Thanks Brett I'll have a play around with this. With regards to you mentioning price vs price1, that script works when editing an item directly, so I'll keep that in mind but I'm not sure that's the issue. Most appreciated. I'll let you know how I go when I get a chance to play around with it.
-
I asked NetSuite Support. They did not give me an answer yet just a defect, Defect # 257668 I'm not nervous at all!
-
It still appears on my site. Just checked.
-
I suspect a spate.
-
But you might be able to use LOCATE(substr,str) to find the space within the string. It returns as a number the position of the space. Then you could use that value in the first bit I mentioned to get all values before the space. Simple! So maybe LEFT(str,LOCATE(substr,str)) might work.
-
Sorry, that isn't reliant on the position of the space, just the number of characters you specify. That may not help.
-
Try LEFT(str,len) I haven't.
-
function field_change(type,name) { if (type == 'edit') { if (name == 'custitemsellprice') { ....execute some code } } } This doesn't work in edit mode.
-
OK thanks, that makes a bit more sense. So can I specify two types in the one reference or do I need to have two instances of the same code? eg, if (type == edit OR xedit) execute code... I mean, OR is obviously not correct, but it be done in this way?
-
As an alternate solution, you need to place the client side logic on a User Event Script (either before or after submit - which ever fits your process), and have a condition their that would let it execute only on xedit event. xedit? Explain. What is it? How do I execute it? Is there documentation somewhere? Never heard of…
-
Thanks for clarifying. Appreciated. Thanks for the links too, but I need to read up on User Events as per the previous posts. I'll search the help. At least I'm in the ballpark now. Cheers.
-
Thanks for explaining the difference. I guess what I'm asking is, if I had a script running on a form, how do I know what side it is?
-
Actually, putting { if (type == 'edit) } around my code causes it not to execute when I'm editing the product. Why is netsuite so randomly hard?
-
Thanks for trying. That's about as clear to me as string theory. Not your fault, but the dumb-it-down-for-others approach helps the most people. There's always the assumption in the help documentation that you know everything except the bit you're reading up on. Instead it just bamboozles you with stuff.