My Stuff
Comments
-
Is your function attached to the field change event or the post sourcing event? If your field is attached to the on change event, try relocating it to the post sourcing event. Another possibility is that your nlapiSetCurrentLineItemValue method is triggering a validate field method that is returning false, preventing the…
-
GusGus - Exactly, that approach is absolutely doable, although it may be a significant lift depending on your requirements. Also, make sure you've ruled out the possiblity of using restrictions. Restrictions are the built-in way of allowing users to work with some records of one type but not other records of the same type.
-
If you're creating the journal entry because the AR or AP account was not available in the custom GL plug-in, that is resolved in 2018.1.
-
For a multi-select, you want setFieldValues (plural): // define the Item's options recMatrixParent.setFieldValues('custitem33', arrColor);
-
I would avoid manipulating the onClick event if possible. You're going to be fighting with each new release to stay compatible. Look further into creating a separate button for your process. To deal with the issue you mentioned with the new job record not being in the drop-down list, change your preference for MAXIMUM…
-
I see that you're attempting to access content on forms.na2.netsuite.com, what domain is the user trying to access that from? Make sure you're not crossing subdomains and violating a same origin policy. You can try accessing the same suitelet on a different domain or setting the Access-Control-Allow-Origin header if…
-
In a Suitelet, you have nlobjResponse.sendRedirect(type, identifier, id, editmode, parameters) if you want to redirect the browser from server-side code.
-
Unless it's SuiteScript 2.0, in which case you want to use log.debug( { title: "some title", details: "some details" } )
-
You can add to the state list, but I don't believe that you can edit the built-in state list.
-
In fact, the state's full name, Yamaguchi, is in the billaddress field in the XML in your post above.
-
The console.log method is only available in the web browser. It sounds like you may be editing a server script, in which case you want to use nlapiLogExecution("DEBUG", "TITLE", "DETAILS");
-
Absolutely, there are a number of approaches. One approach has your script processing the results of a saved search. As records are processed, they no longer meet the criteria to be included in the saved search. After each record is processed, you can run the following code: if(nlapiGetContext().getRemainingUsage() <…
-
Sure! You would use console.log as follows: console.log("whatever you want to log")
-
Have you been able to diagnose where the script is failing in IE? Generally, the process is: 1. User event script adds button 2. Client script runs on button click and calls Suitelet URL 3. Suitelet runs when URL is called I'd start by trying to diagnose where the failure occurs - does the button show up? If you start the…
-
Can you elaborate on what you mean when you say that doesn't actually cancel the vendor bill? In my testing, rejecting the bill as follows caused it not to post and have a status of "rejected:" var bill=nlapiLoadRecord(nlapiGetRecordType(), nlapiGetRecordId()); bill.setFieldValue('approvalstatus', '3'); // rejected…
-
GusGus - The URL and URL parameters are available in the before load user event, not the before submit event. If you want to access them in the before submit event, you need to first read them in the before load field and store them in fields, a custom record, or somewhere else.
-
Agreed with Oliver, It should trigger an after submit user event script with type = "dropship" - so you will have to reload the PO, change the custom form, and re-submit.
-
Check out the page in HELP called "Search Operators." Different search operators are valid for different data types, so you may be getting this error because the custom field's data type is not compatible with the anyof operator. For instance, if the data type is numeric, then you would actually want to use the "any"…
-
Is the line-level location field applied to the custom form used by one subsidiary and not the other?
-
Got it, thanks for clarifying. Although undocumented, this works for me: var bill=nlapiLoadRecord(nlapiGetRecordType(), nlapiGetRecordId()); bill.setFieldValue('cancelvendbill', 'T'); nlapiSubmitRecord(bill, true, true);
-
It sounds like you may be asking about a custom field with the "Store Value" checkbox UNCHECKED. You can set those fields in the before load user event when a record is being edited.
-
The mediaitem sublist appears to be scriptable with client scripts, have you considered using a client script?
-
As mentioned, you could consider using a user event script as well. But as a client script, just call your function as follows: function myPageInit(type) { if(type == 'create') { setRefundAccount(); } }
-
I inserted this code and didn't receive any errors. Do I navigate to "Script Execution Logs" to see the results? If so, I'm not seeing anything there after executing this script in multiple browsers. Yes, these logs should show up under the script execution logs tab of the script record. It's possible that your script's…
-
The URL for copying a PO is: nlapiResolveURL('RECORD', 'purchaseorder', INTERNAL_ID_GOES_HERE, true) + '&memdoc=0'; If you need to specify some field values in the URL, you can set them as follows: nlapiResolveURL('RECORD', 'purchaseorder', 45778, true) + '&memdoc=0&record.memo=MY%20MEMO';
-
Using a Suitelet that is available without login is an option. However, this won't be very secure. If the email were forwarded, the recipient of the forwarded email would also be able to approve the PO. I'd recommend having the user log into some secure system. The system doesn't have to be NetSuite - the other system can…
-
This code works fine for me. Am I understanding your question correctly? function beforeSubmit() { var record = nlapiGetNewRecord(); // select first addressbook line record.selectLineItem('addressbook', '1'); // load the subrecord and set the attention field var subrec = record.editCurrentLineItemSubrecord('addressbook',…
-
I haven't tested this, but assuming you're right and no user event scripts fire when the contact role is changed how about this: A user event script that hides the "Update Primary" button on the contacts sublist and creates a new custom "Update Primary" button. A client script that opens a suitelet popup when clicking the…
-
That's the short name, but the full name is available in Latin characters. Check out the list at Setup>Company>States/Provinces/Counties
-
Yes, here you go! nlapiGetContext().getFeature('Subsidiaries')