My Stuff
Comments
-
It looks like you're over your usage limit. nlapiDeleteRecord takes 20 usage point and a scheduled script has 10,000 available units. 20*500 = 10,000 plus you use 10 for the search
-
You could try doing a user note search (recordtype=note). While I do not see this outlined in the SuiteScript Records Browser, it should work as you can do this from the UI searches in using the transaction join. Add a filter such as nlobjSearchFilter('internalid','transaction','is',nlapiGetRecordID()) You can look at the…
-
I believe you need to do it via form-level client script if I remember correctly. For some reason, kit/package records are not available at record-level client script. Not sure why.
-
nlapiCreateRecord('note') You'll want to check the Note record under the SuiteScript Records Browser. You'll see there are two fields record and recordtype which are used to link the note to a custom record. You can also do the same for entity and transaction record types, along with some others. Add the fields you'd like…
-
I've worked up something similar to this previously before the requirement was dropped. I used a scheduled script that used the Messages join on transactions. You have to get creative with your filters to find just replies, but it can be done. You can filter on from email address not being on your company's domain. The…
-
For amount, you do not have an nlobjSearchColumn object defined for it. You actually have two of 'total' unless that's just a misprint. I think your type filter is also incorrect. You'll have to check the list of internal IDs for transactions, but I think the internal ID of an invoice is "CustInv"
-
if you search on nlapiXMLToPDF in the Help documents you should find most of the information regarding the BFO engine, tags, and syntax and how to create PDFs from NetSuite. You can certainly create custom reports with this; however, you'll be creating the reports entirely from ground up via code. You can use searches to…
-
Your call to nlapiSearchRecord needs to read as follows: var searchresult = nlapiSearchRecord('task',null,filters,columns); The second parameter which is null is where you can insert the internal ID of an existing saved search in the system.
-
If you receive 1000 for the length, then re-run the search. You'll either get more results or 0
-
Just check the length of the array. Keep in mind that the nlapiSearchRecord will only return up to 1,000 records at a given call. If your search has more than 1,000 you'll have to do some additional coding to re-execute the search until all results are found. var results = nlapiSearchRecord('record_type',.......);…
-
nlapiGetRecordType()
-
Time records aren't available yet in SuiteFlow - would have to be done via scripting. If the record type would be available in SuiteFlow, that would be a much easier approach in doing this provided you don't need to default line items.
-
In terms of searching, you could create a custom formula filter (numeric) for this. However, I'm not sure how flexible it'd be to edit for frequent changes. All of the functions are available in NetSuite formulas with the exception of RADIANS() but you can calculate that my multiplying the degree by PI/180 (~0.017453293).…
-
code seems ok to be...probably need an extra ; after your closing of the $(#log).bind() i.e. ..... });'; ....
-
What are you trying to bind to using jQuery? It is something outside of the portlet?
-
You cannot create an item fulfillment record via nlapiCreateRecord as it must link to another transaction. Try using nlapiTransformRecord to create it by using the sales order data such as follows: var ifRecord = nlapiTransformRecord('salesorder',so,'itemfulfillment') When interfacing with the line items of the item…
-
Does the field that contains the 'image' already have the URL in it? If it doesn't have the URL until the image is there, then you could check the field for being empty/null. If you have to actually check the URL/image for existence, you might be able to use AJAX and check the status code. The feasability of this would…
-
This does work for at least some select fields. I have at least one script written recently that sets a couple of custom select fields on orders. I use nlapiSubmitField and pass the fields in as an array along with the data.
-
Yes, it happens on our specialized quotes which can sometimes have a few images. However, it also happens on some other PDF documents which just have a logo. It almost seems like the BFO generator/library gets overwhelmed and errors out. I have a case into NS about this - when I get some firm answers - I'll post them.
-
Try setting the synchronous flag as true for the last parameter of nlapiSetFieldValue Example: nlapiSetFieldValue('account',488,true,true) It could be an issue of timing in the execution of the code as different fields source other fields.
-
Did you try setting this field, printedpickingticket? This is referenced in the document under the available search filters for the sales as that field ID. Not sure if its something you can set though via script.
-
Your best bet is to use a User Event script triggering on the Approve event type.
-
You can get the employee email all in one shot using nlapiLookupField Ex: var employeeEmail = nlapiLookupField('employee',orderReq,'email');
-
The script looks good from what I can see. I would debug and see what value is being assigned to thisAccount variable. The error is referring to the missing ID parameter for the nlapiLookupField call that gets the custom field custrecord10 from the account record.
-
If start_date, end_date, and current_date are all JS date objects then you should be able to use regular operators such as the following: if(!(start_date <= current_date && end_date >= current_date)) { //Your Code Goes Here... } if you're pulling the dates directly from NS fields you can use the nlapiStringToDate()…
-
Hi Adam, You do not need to do a search join to get line item data on a transaction search. If you're looking for the amount on a particular line item, then the search column would be: column[x] = new nlobjSearchColumn('amount'); Since you have mainline = F as a filter, you will only get back line items vs. the main…
-
I've gotten this to work - I'm not 100% on whether this is entirely supported or just undocumented. The package list is tricky and how you call it depends on the shipping method you select. If you're working with a UPS shipping method, the list name is packageups. If you're working with a custom method like say LTL…
-
You can get the current date by using the JavaScript date object: var currentDate = new Date()
-
You'd have to construct some XML for use with NetSuite's nlapiXMLToPDF API call which uses BFO's PDF engine. Get your data out of NetSuite using lookups, searches, etc. and then format the data as necessary in the XML using styles, tables, images - whatever you'd like.
-
I've done some custom CSV upload/processing scripts before. If you're writing a custom Suitelet upload form, you'll want to use the request.getFile() call to get the file back from the form. I believe that returns a NS nlobjFile from which you can use the getValue() which should return you the raw text data from the CSV If…