@@brianeno2984 Hmm I haven't, but I do notice that "isDefault" is a property in the .vscode/tasks.json file, on line 10. It should be set to true. Maybe you're missing that setting?
Great explanation. FYI I was having an issue trying to run the build and deploy. I got an error primordials is not defined. Downgrading to node 10 from 12 and gulp 3.9 helped with this.
I have a few questions: 1. In .hitc-upload, is "companyID" what I would update to my Account ID from NS? 2. do I HAVE to use Typescript for this workflow to upload scripts to Netsuite? I'd like to use vanilla js files or is TS a requirement for Gulp? (sorry for the noob question here) 3. do I need to have the '/SuiteScripts' directory already created in my filecabinet in my NS account or will this workflow create it if it doesnt exist? Thanks!
Hey William, thank for your comment. Yes, companyId should be set to your NetSuite account ID. And no, you don't have to use TypeScript, you should be able to use regular JS files. I also wanted to mention that this video is a couple of years old at this point, please check out the more recent one I did here that covers the same type of setup: th-cam.com/video/xsGxUhYo9WI/w-d-xo.html
@@hitc-netsuite So I made these changes but I cannot compile/build. This is the error I am getting: Executing task: c:\Users\MyUserName\Documents\ssv2video-suitescripts ode_modules\.bin\tsc.cmd -p c:\Users\MyUserName\Documents\ssv2video-suitescripts\tsconfig.json /usr/bin/bash: line 1: c:UsersMyUserNameDocumentsssv2video-suitescriptsnode_modules.bintsc.cmd: command not found The terminal process "C:\Program Files\Git\bin\bash.exe '-c', 'c:\Users\MyUserName\Documents\ssv2video-suitescripts ode_modules\.bin\tsc.cmd -p c:\Users\MyUserName\Documents\ssv2video-suitescripts\tsconfig.json'" terminated with exit code: 127. Any thoughts? Any help would be super appreciated Robin! Thank you :)
@@nipponmurri That's not an error I'm familiar with. But here is a similar video I did last year where I did it on Windows instead of Mac, maybe that'll help: th-cam.com/video/Wf_z7IpTaJU/w-d-xo.html
@@hitc-netsuite So I followed the instructions in the Windows 10 video. When I run the Ctrl+Shift+B command it attempts to execute the task 'gulp build-and-upload --file ' it seems to be looking for something inside of C:\Users\MyUserName\AppData\Roaming pm/node_modules/bin/node: No such file or directory What is gulp looking for here? Does it need .bin files for gulp to execute? Apologies for the noob questions as I have not used Gulp in my workflow before but I am in dire need of getting this Netsuite file uploading connection working. If there is any useful documentation you can direct me to that would be fantastic! Edit: is gulp looking for a gulpfile.js in this directory? Edit 2: SO I was able to finally get around this issue. I was not running Vscode as Administrator. I am now getting `/usr/bin/bash: line 1: gulp: command not found'
Sorry, maybe I have another question about NetSuite, I’m new at that ... I have a test to create a table, that should be filled by data from csv, and that table should have one additional column ... I can’t do it , because I have misunderstanding.... could you help me please ???
How to get the browser information in suitescript sir like window screen height,width and color depth.. in Java script we use navigator.height() like this way but in suite scripts navigator and window objects are not working.
In client scripts, the regular JavaScript methods (such as window.innerHeight) work just fine. But user-event scripts (and other types) run server-side and there is no browser involved.
I am getting something while running - what does mean of that?? Executing task: C:\Users\LENOVO\AppData\Roaming pm\gulp build-and-upload --file e:\ssv2video-suitescripts\ssv2\customerUserEvent.ts < The terminal process failed to launch: A native exception occurred during launch (Unable to start terminal process: CreateProcess failed). Terminal will be reused by tasks, press any key to close it.
I've started getting this recently with VS Code as well. I haven't been able to figure it out! Please let us know if you do. The only workaround I've found is to use WebStorm instead.
Okay, I think I figured this out. If you add a line to your .vscode/tasks.json file that says "type": "shell" then it should resolve this. Found this from information on this article: github.com/microsoft/vscode/issues/104343
Is there a way to setup the hitc-upload file with multiple accounts and program the build command to allow you to select which env you want to upload to
Yes, your .hitc-upload file would look something like this: { "accounts": [ { "name": "My main account", "companyId": "123456", "cabinetPath": "/SuiteScripts/" }, { "name": "My other account", "companyId": "777777", "cabinetPath": "/SuiteScripts/" } ] }
I managed to get all the dependancies working and the code is compiling but im getting an upload issue where there is no such file or directory ..\build\customerUserEventsTest.js'. I notice you have a "build" folder in your repo in the video but not in your example. When i try to manually add a "build" folder it still does not work. How is that "build" folder generated?
The issue may be that your TypeScript file needs to be within an ssv2 folder, not in the root directory. Then, when you run the built command, typescript should generate the build/ssv2/customerUserEventTest.js file.
I get the following error "[Error: ENOENT: no such file or directory, stat './build']" when trying to run the build and upload task. Any thoughts on how to overcome this?
Hmm, the first thing that comes to mind is to make sure that your TypeScript script files are actually in the ssv2 directory. Using that folder structure is not optional :)
I'm getting the following error when executing the task 'build-and-upload': TypeError: require(...).setupHITCGulp is not a function. I'm using the newest packages: "@hitc/netsuite-tools": "^3.0.5", "@hitc/netsuite-types": "^2021.1.12", "@hitc/netsuite-upload": "^2.0.6", "gulp": "^4.0.2" Do I have to use an other function in the gulpfile.js or do I have to use other versions of the packages?
I've found the solution in the video th-cam.com/video/Wf_z7IpTaJU/w-d-xo.html. I've used the content of the gulpfile.js showed in that video: const gulpTools = require('@hitc/netsuite-tools/gulptools'); gulpTools.setConfig([]); module.exports = gulpTools;
Hola, Exelente video. A ver si me ayudas con esto por favor. import {EntryPoint} from "N/types"; Me esta dando un error en la parte de "N/Types". Es como si no lo reconociera o como si no tuviera acceso o quizas es que me esta faltando de instalar algo. Gracias por la ayuda de antemano!
Hola! The first place I would check is to make sure that your tsconfig.json file is correct. Assuming you have run the "npm install", it should be able to find the EntryPoints correctly
Hey Robin, I tried using node 11.15.0 with nvm but I keep getting the primordial is not defined. I tried fixing it use npm-shrinkwrap which gets around that issue but then the build fails with an ENOENT error where it tries to find build/npm-shrinkwrap.json. Please help if you can, I would really appreciate it. Thank you.
Once you install the HITC Uploader bundle, you'll have the role in your NetSuite account. Then you just need to edit your employee record and add the role to your list of roles on the Access tab.
This is awesome, i'm getting an error when I attempt to upload...any ideas :)? AppData\Roaming pm\gulp build-and-upload --file 'c:\Users\marmada\Documents\Netsuite Scripts - Upload\ssv2\customerUserEvent.ts'' failed to launch (exit code: {2})
Hi Robin, Again Thank you for all your efforts; Might you know a fix to this error within the vscode terminal; "The terminal process "C:\windows\System32\cmd.exe /d /c gulp.cmd build-and-upload --file c:\ssv2video-suitescripts\.vscode\tasks.json" terminated with exit code: 1." "Problem finding gulp tasks. See the output for more information."
A note for Windows users - in the .vscode/tasks.json file, the command should be "gulp.cmd" instead of just "gulp"
Hey Robin...running into an issue when running build...missing “default” task. Have you encountered such an error?
@@brianeno2984 Hmm I haven't, but I do notice that "isDefault" is a property in the .vscode/tasks.json file, on line 10. It should be set to true. Maybe you're missing that setting?
@@hitc-netsuite please pin this :D... Also thank you for all your efforts
Robin, as an experienced Netsuite user w/o any development experience a very clear and useful video on what script is capable of. Thanks!
Great explanation. FYI I was having an issue trying to run the build and deploy. I got an error primordials is not defined. Downgrading to node 10 from 12 and gulp 3.9 helped with this.
Agreed, got the same issue
this is great -- I really wish there was a video on GET, POST, PUT, DELETE requests for a Netsuite Endpoint
Check this one! th-cam.com/video/MAOMQp5dh0U/w-d-xo.html
I have a few questions:
1. In .hitc-upload, is "companyID" what I would update to my Account ID from NS?
2. do I HAVE to use Typescript for this workflow to upload scripts to Netsuite? I'd like to use vanilla js files or is TS a requirement for Gulp? (sorry for the noob question here)
3. do I need to have the '/SuiteScripts' directory already created in my filecabinet in my NS account or will this workflow create it if it doesnt exist?
Thanks!
Hey William, thank for your comment. Yes, companyId should be set to your NetSuite account ID. And no, you don't have to use TypeScript, you should be able to use regular JS files. I also wanted to mention that this video is a couple of years old at this point, please check out the more recent one I did here that covers the same type of setup: th-cam.com/video/xsGxUhYo9WI/w-d-xo.html
You are a life saver! Thank you so much Robin!
@@hitc-netsuite So I made these changes but I cannot compile/build. This is the error I am getting:
Executing task: c:\Users\MyUserName\Documents\ssv2video-suitescripts
ode_modules\.bin\tsc.cmd -p c:\Users\MyUserName\Documents\ssv2video-suitescripts\tsconfig.json
/usr/bin/bash: line 1: c:UsersMyUserNameDocumentsssv2video-suitescriptsnode_modules.bintsc.cmd: command not found
The terminal process "C:\Program Files\Git\bin\bash.exe '-c', 'c:\Users\MyUserName\Documents\ssv2video-suitescripts
ode_modules\.bin\tsc.cmd -p c:\Users\MyUserName\Documents\ssv2video-suitescripts\tsconfig.json'" terminated with exit code: 127.
Any thoughts? Any help would be super appreciated Robin! Thank you :)
@@nipponmurri That's not an error I'm familiar with. But here is a similar video I did last year where I did it on Windows instead of Mac, maybe that'll help: th-cam.com/video/Wf_z7IpTaJU/w-d-xo.html
@@hitc-netsuite So I followed the instructions in the Windows 10 video. When I run the Ctrl+Shift+B command it attempts to execute the task 'gulp build-and-upload --file '
it seems to be looking for something inside of C:\Users\MyUserName\AppData\Roaming
pm/node_modules/bin/node: No such file or directory
What is gulp looking for here? Does it need .bin files for gulp to execute?
Apologies for the noob questions as I have not used Gulp in my workflow before but I am in dire need of getting this Netsuite file uploading connection working. If there is any useful documentation you can direct me to that would be fantastic!
Edit: is gulp looking for a gulpfile.js in this directory?
Edit 2: SO I was able to finally get around this issue. I was not running Vscode as Administrator. I am now getting `/usr/bin/bash: line 1: gulp: command not found'
Sorry, maybe I have another question about NetSuite, I’m new at that ... I have a test to create a table, that should be filled by data from csv, and that table should have one additional column ... I can’t do it , because I have misunderstanding.... could you help me please ???
how to get export as script in netsuite
How to get the browser information in suitescript sir like window screen height,width and color depth.. in Java script we use navigator.height() like this way but in suite scripts navigator and window objects are not working.
In client scripts, the regular JavaScript methods (such as window.innerHeight) work just fine. But user-event scripts (and other types) run server-side and there is no browser involved.
Sir actually I want these window screen height all these in plug-in script.
Ok sir now I got it. Any possibility is there to write the function in the client script and call that function to the plugin script.
I need customer browser details colorDepth(), height (), width() and userAgent()
Where can I find the .vscode folder? It was not showing up in the .zip file that Robin posted in the comments.
It may not show up because it is a hidden folder. But if its truly not there, you can create it manually.
I am getting something while running - what does mean of that??
Executing task: C:\Users\LENOVO\AppData\Roaming
pm\gulp build-and-upload --file e:\ssv2video-suitescripts\ssv2\customerUserEvent.ts <
The terminal process failed to launch: A native exception occurred during launch (Unable to start terminal process: CreateProcess failed).
Terminal will be reused by tasks, press any key to close it.
I've started getting this recently with VS Code as well. I haven't been able to figure it out! Please let us know if you do. The only workaround I've found is to use WebStorm instead.
Okay, I think I figured this out. If you add a line to your .vscode/tasks.json file that says "type": "shell" then it should resolve this. Found this from information on this article: github.com/microsoft/vscode/issues/104343
@@hitc-netsuite okay, will try.. thank you
Is there a way to setup the hitc-upload file with multiple accounts and program the build command to allow you to select which env you want to upload to
Yes, your .hitc-upload file would look something like this:
{
"accounts": [
{
"name": "My main account",
"companyId": "123456",
"cabinetPath": "/SuiteScripts/"
},
{
"name": "My other account",
"companyId": "777777",
"cabinetPath": "/SuiteScripts/"
}
]
}
I managed to get all the dependancies working and the code is compiling but im getting an upload issue where there is no such file or directory ..\build\customerUserEventsTest.js'. I notice you have a "build" folder in your repo in the video but not in your example. When i try to manually add a "build" folder it still does not work. How is that "build" folder generated?
The issue may be that your TypeScript file needs to be within an ssv2 folder, not in the root directory. Then, when you run the built command, typescript should generate the build/ssv2/customerUserEventTest.js file.
@@hitc-netsuite That worked. Cheers!
Is there a way to generate these script boiler plates automatically?
Not currently. You may be best off just creating your own boiler plate template files to do a save-as from.
I get the following error "[Error: ENOENT: no such file or directory, stat './build']" when trying to run the build and upload task. Any thoughts on how to overcome this?
Hmm, the first thing that comes to mind is to make sure that your TypeScript script files are actually in the ssv2 directory. Using that folder structure is not optional :)
@@hitc-netsuite ok that sounds about right. How does this Setup differ for the two factor authentication upgrade for Kilimanjaro and Vinson packages?
I'm getting the following error when executing the task 'build-and-upload': TypeError: require(...).setupHITCGulp is not a function.
I'm using the newest packages:
"@hitc/netsuite-tools": "^3.0.5",
"@hitc/netsuite-types": "^2021.1.12",
"@hitc/netsuite-upload": "^2.0.6",
"gulp": "^4.0.2"
Do I have to use an other function in the gulpfile.js or do I have to use other versions of the packages?
I've found the solution in the video th-cam.com/video/Wf_z7IpTaJU/w-d-xo.html. I've used the content of the gulpfile.js showed in that video:
const gulpTools = require('@hitc/netsuite-tools/gulptools');
gulpTools.setConfig([]);
module.exports = gulpTools;
Hola,
Exelente video. A ver si me ayudas con esto por favor.
import {EntryPoint} from "N/types";
Me esta dando un error en la parte de "N/Types". Es como si no lo reconociera o como si no tuviera acceso o quizas es que me esta faltando de instalar algo.
Gracias por la ayuda de antemano!
Hola! The first place I would check is to make sure that your tsconfig.json file is correct. Assuming you have run the "npm install", it should be able to find the EntryPoints correctly
@@hitc-netsuite Hello! The tsconfig its OK but the npm when i try to intall, make me error.
@@christophertrinidad1688Hmm, what error do you get when you try to run npm install?
Hey Robin, I tried using node 11.15.0 with nvm but I keep getting the primordial is not defined. I tried fixing it use npm-shrinkwrap which gets around that issue but then the build fails with an ENOENT error where it tries to find build/npm-shrinkwrap.json. Please help if you can, I would really appreciate it. Thank you.
u need to run the build command on a .ts file not the tsconfig or other config files
thank you very much for the awesome video, node V12 didn't work for me but v10 is working fine
I don't have any HITC uploader on my role. How can I get that ?
Once you install the HITC Uploader bundle, you'll have the role in your NetSuite account. Then you just need to edit your employee record and add the role to your list of roles on the Access tab.
@@hitc-netsuite thanks. Ill try that 🙂
Thank you, really clear and useful
I guess I'm out of my league here because that was incredibly confusing. Thanks anyway.
Here are the setup code files: www.headintheclouddev.com/code/vs-code-tba.zip
This is awesome, i'm getting an error when I attempt to upload...any ideas :)?
AppData\Roaming
pm\gulp build-and-upload --file 'c:\Users\marmada\Documents\Netsuite Scripts - Upload\ssv2\customerUserEvent.ts'' failed to launch (exit code: {2})
Thank you
Hi Robin, Again Thank you for all your efforts;
Might you know a fix to this error within the vscode terminal;
"The terminal process "C:\windows\System32\cmd.exe /d /c gulp.cmd build-and-upload --file c:\ssv2video-suitescripts\.vscode\tasks.json" terminated with exit code: 1."
"Problem finding gulp tasks. See the output for more information."