netsuite

Restrict what customers an employee can see (NetSuite)

非 Y 不嫁゛ 提交于 2019-12-12 05:08:16
问题 I'm customizing some NetSuite objects (forms, etc) including the Employee Centre's Time Tracking form. We want the people recording time (external contractors) to be able to enter time only against the projects and project tasks they have been explicitly assigned to. So far it's going well, the only major problem is how to restrict what Customers they can see. Currently the Customer field is where the system expects them to enter the name of the project, however that field will try to be

Generate GUID at runtime without using form in NetSuite

强颜欢笑 提交于 2019-12-12 04:54:24
问题 Hye there, I'm trying to prepare a scheduled script in NetSuite which will pick a particular directory from file cabinet and deploy it on SFTP server. I'm using 2.0 module and here is my code - require(["N/sftp",'N/record','N/file'], function(sftp,record,file) { function onRequest() { var myPwdGuid = "13139ac567b14f74bdaXXXXXXX"; var myHostKey = "AAAAB3NzaC1ycXXXXX"; var connection = sftp.createConnection({ username: 'Your user name', passwordGuid: myPwdGuid, url: 'Your host name', directory:

Pull out data from a specific month in Netsuite

人盡茶涼 提交于 2019-12-12 04:52:51
问题 Trying to extract data from every months of the year. I haven't seen much info on it. I tried many formulas but nothing worked. Stuff like: CASE {trandate} WHEN 'YYYY' = '2018' AND 'MM' = "01" then {amount} ELSE 0 END Anyone knows how to do? 回答1: Taking your example and correcting (note William Robertson's comment): CASE WHEN TO_CHAR({trandate},'YYYY') = '2018' AND TO_CHAR({trandate},'MM') = '01' THEN {amount} ELSE 0 END This will return {amount} for every transaction in January 2018 which

How to refer the web file for RESTlet script in Netsuite?

允我心安 提交于 2019-12-12 04:19:03
问题 I have created two RESTlet file. First one uploaded from computer . Script id - 1, Deployment id - 1 Second one uploaded from web . Script id - 2, Deployment id - 1 The RESTlet which was uploaded from computer, can call by token details and can get Netsuite details. But i could not call and access from Script id -2 and Deployment id-1. I got reference error, when i call the RESTlet script uploaded from web. This is the link of my file http://support.gunify.com/wp-content/uploads/2015/11/gu

How to get all custom fields of a particular record type in Netsuite using RESTlet?

徘徊边缘 提交于 2019-12-12 04:10:02
问题 I can create a customer, lead, contact using RESTlet. But my code is used by someone who created custom fields with required option. When I try to create a customer, I am getting error by custom required fields. I want to pass the data for custom required fields too. How to know the all custom fields categorized by required and none required using RESTlet? 回答1: You can use var record = nlapiCreateRecord(RECORD_TYPE); var fields = record.getAllFields(); var requiredFields = []; fields.forEach

NetSuite Restlet PDF file encoding issue

穿精又带淫゛_ 提交于 2019-12-12 04:07:53
问题 My code correctly creates a file in document repository as well as attach it to a record in NetSuite. However, the file type is 'Other Binary File' when it should be a PDF. I read that for PDF we must encode in base 64 but even then it doesn't generate the PDF. Anyone see an issue? var fileobj = nlapiCreateFile(docname, doctype, doccontent) fileobj.setName(docname) fileobj.setFolder(folderid) fileobj.setIsOnline(true) fileobj.setEncoding('UTF-8') var fileid = nlapiSubmitFile(fileobj) Passed

How to get data of sublist in suitelet using request getparameter?

﹥>﹥吖頭↗ 提交于 2019-12-12 03:42:35
问题 var form = nlapiCreateForm("Process Order Items"); var locField = form.addField('custpage_locationlist', 'select', 'Location', 'location').setMandatory(true); if(locationId != '') locField.setDefaultValue(locationId); var vendorField = form.addField('custpage_vendorlist', 'select', 'Vendor', 'vendor').setMandatory(true); if(vendorId != '') vendorField.setDefaultValue(vendorId); form.addField('custpage_incitemnoprefvendor', 'checkbox', 'Include Items With No Preferred Vendor'); form.addField(

suitescript set custom column value netsuite

大兔子大兔子 提交于 2019-12-12 03:34:52
问题 Using Pick, Pack and Ship and advanced PDF HTML templates, NetSuite cannot display the qty remaining to pick. So if we do a partial pick, we cannot show the warehouse the remaining balance. The math is simple, here is the script and function I would like to see (based on forum feedback). Will this work and what is the best way to deploy this script such that the result is stored in the custom column until another pick takes place? The value is to be calculated at time of changes, but

Suitescript Code stops for no apparent Reason

寵の児 提交于 2019-12-12 03:23:25
问题 I have the following code which executes a search, then just stops. for (var i=1; i<=numberItems; i++ ) { nlapiInsertLineItem(SUBLIST_Items,1); var itemID = vendorItems[i].getId(); nlapiSetCurrentLineItemValue(SUBLIST_Items,'custrecordvpri_item',itemID ); var avgCost = Round(nlapiLookupField(itemType,itemID,'averagecost'),4); var stdCost = Round(nlapiLookupField(itemType,itemID,'custitem_costrepl'),4); var lastCost = Round(nlapiLookupField(itemType,itemID,'lastpurchaseprice'),4); if (isNaN

How to delete multiple contacts for the user in Netsuite?

痴心易碎 提交于 2019-12-12 02:57:44
问题 I could delete multiple phone calls through Mass Updates . I can delete single contact , lead , customer ...etc in UI and RESTlet code. I want to delete multiple contacts,leads, customers, prospects, partners and vendors in UI and also using RESTlet code. 回答1: You can create a simple, custom mass update script that can be deployed to delete any record type using the Mass Update functionality. At the most basic, it would look like this: function deleteRecord(recordType, recordId) {