Great demo. The last part illustrates the inherent weakness of Client script in VIEW mode. This video is a good primer for the basics of SS 2.0, syntax at a high level, how to get that script up to NetSuite., and how to deploy it. Many areas where you could of talked about more things, but didn't. And I think for this video that's perfect. A nice quick brief but complete walkthrough. Well done!
Sir yor method of teaching and elaborating the concepts is very simple and very effective, I want to learn and perform java script concepts in depth for netsuit. Thank you very much for sharing this informative and effective vedio session.
Great Tutorial. I et no Errors but I also get no Popup message. /** @NApiVersion 2.0 @NScriptType ClientScript @NModuleScope Public */ define([], function (){ function showMessage(){ var message = "My Test Script Popup"; alert(message); } return { pageInit: showMessage }; });
I had a similar issue. I followed this video to the T and the script was not executing. I realized it was a dumb mistake on my part. Here is what I was doing wrong. When I was uploading the script to NetSuite using the + symbol a pop-up box came up. I clicked choose file and selected the script I wanted. There was another field within the pop-up called FIELD NAME. I thought I would fill in this field thinking it organizes my scripts. Nope, it replaced my script with pretty much an empty file. I kept the file name field clear and submitted the script. It works like a charm now. Not sure if you had the same issue but I figured I'd throw that out there.
There's not much I can do without seeing code and the Deployment. All I can say at the moment is to go through the steps in the video again and double-check you've done them all. You can also make sure your browser is not blocking popups on the page.
Tried to complete this and got this message from NS: Fail to evaluate script: {"type":"error.SuiteScriptModuleLoaderError","name":"UNEXPECTED_ERROR","message":"syntax error (SS_SCRIPT_FOR_METADATA#10)","stack":[]}
I would like to thank you. I have a problem, I followed all the steps and once I selected the File it asks to select SuiteScript API 1.0 not 2.0! how to change?
Hmm, this didn't work for me either. I've closely inspected the file I uploaded, but nothing popped up when I edited the corresponding record in NetSuite. Has something changed in NetSuite since this video was published? /** @NApiVersion 2.0 @NScriptType ClientScript @NModuleScope Public */ define([], function () { function showMessage() { var message = "Hi There!"; alert(message); } return { pageInit: showMessage }; });
@@StoicSoftware Script Record Screenshots - www.screencast.com/t/qbVBXjVYvI0 and www.screencast.com/t/ZMkG0IVe2Ns, and deployment record - www.screencast.com/t/tsIAhzdwCj
@@timpedersen3525 Are you blocking popups or alerts? Assuming your user is "BC Admin", this all looks fine. Try a `console.log` statement instead of an alert, and open the browser's developer console (usually F12) before you refresh the record page.
@@StoicSoftware No pop up blockers that I can see. I looked in the chrome extensions, and there aren't anythings like pop up blockers there. I attempted changing my alert to a console.log message, but I don't see anything in the console either. Here's a video - www.loom.com/share/a39e421d9bfa43d1bbe86b3d0d70890f
I hope you can help me. I think my code is an exact copy of yours but I get this error. "SuiteScript 2.0 entry point scripts must implement one script type function." Can you help me? Thank you.
There's a debugger environment, but I don't use it myself so I don't have too much advice for you there. Check out the Slack at netsuiteprofessionals.com/; definitely someone there who can help.
I am starting to learn SuiteScript, I am a Functional Consultant and want to go for extra skills. Which would you recommend for me, 1.0 or 2.0? We are currently using 1.0 on our company. Thanks!
I just wrote about this *exact* topic for the Effective SuiteScript mailing list this week; once that email goes out on Thursday. I will post my response and reasoning publicly as well. Short Answer: Start with 2.0.
There are many advantages to 2.0. I go through some of them in the SS2 Modules video: ruclips.net/video/YdPFCYZijPY/видео.html but the biggest advantage is going to be that moving forward, all new SuiteScript features will be added to 2.0, but not 1.0. Some of these new features already exist, like SFTP and the new Map/Reduce script type. New SDF and CLI functionality will only be added to 2.0. Basically, 1.0 will only get further and further behind. As promised, here is my public response to this question: stoic.software/why-ss2/
Is there any reason that you don't link Eclipse to Netsuite to take advantage of intellisense and other useful features? Just starting Netsuite at my job and was curious.
I do use WebStorm with a NetSuite plugin and an npm-based build pipeline when writing code. When I'm teaching someone that has never seen code before to write a script, introducing an IDE is just way too much overhead and overwhelming.
I use git for all of my version control (check out gitlab.com/stoicsoftware for my public repos). I use a branching scheme similar to gitflow (www.atlassian.com/git/tutorials/comparing-workflows#gitflow-workflow). I also build all my NetSuite customizations as npm packages (www.npmjs.com/). I use npm build scripts to run ESLint, JSDoc, and mocha unit tests on my project.
Ok, very cool. Yeah I was curious about looking into Unit Test for NetSuite. I've never written unit test, which I know is lazy lol, but I plan on doing so this go around as I start fiddling with NetSuite. Thanks for your responses. Love the videos.
Thanks this is very helpful. I am looking to write a custom workflow action that would grey-out a specified transaction column line field. Any ideas please. I have attempted this but no joy at the moment . My code below: /** *@NApiVersion 2.0 *@NScriptType WorkflowActionScript *@NModuleScope SameAccount */ define(['N/record'], function(){ function greyOut(cr){ if (cr.mode == 'edit'){ var cr = cr.currentRecord; var sl = cr.getSublist({sublistId: 'item',field: 'quantity'}); sl.isDiable = true; } }
Oof thank you for pointing this out to me; I let the domain registration on that site lapse. I'm updating the description on all the videos with a real, appropriate link to my blog archives.
Not my first time coding but this definitely helped with the syntax of netsuite and how the modules work, Great work Eric!
Great demo. The last part illustrates the inherent weakness of Client script in VIEW mode. This video is a good primer for the basics of SS 2.0, syntax at a high level, how to get that script up to NetSuite., and how to deploy it. Many areas where you could of talked about more things, but didn't. And I think for this video that's perfect. A nice quick brief but complete walkthrough. Well done!
Superb and great tutorial. You explained very well how non developer can start.
What I was looking today you had already explained 2 years before.
Sir yor method of teaching and elaborating the concepts is very simple and very effective, I want to learn and perform java script concepts in depth for netsuit. Thank you very much for sharing this informative and effective vedio session.
This is a great video, thank you for creating this! It brings understanding to NetSuite and JS!
This was very cool. Thank you for doing this. I just wrote my first script
Thank you for the easy to follow tutorial
literally understood thankyou for making this video
That's so helpful, thank you very much for your effort
I don't speak English, but I thank you for your help.
Thanks for this intro. Very informative
Great Tutorial. I et no Errors but I also get no Popup message.
/**
@NApiVersion 2.0
@NScriptType ClientScript
@NModuleScope Public
*/
define([], function (){
function showMessage(){
var message = "My Test Script Popup";
alert(message);
}
return {
pageInit: showMessage
};
});
I am not getting the popup either. Same code, character for character "Hello, Michael!" instead of "Hello, Eric!"
I had a similar issue. I followed this video to the T and the script was not executing. I realized it was a dumb mistake on my part. Here is what I was doing wrong. When I was uploading the script to NetSuite using the + symbol a pop-up box came up. I clicked choose file and selected the script I wanted. There was another field within the pop-up called FIELD NAME. I thought I would fill in this field thinking it organizes my scripts. Nope, it replaced my script with pretty much an empty file. I kept the file name field clear and submitted the script. It works like a charm now. Not sure if you had the same issue but I figured I'd throw that out there.
Thank you for your sharing
Very helpful, can you please share a video on enable or disable a particular textfield on checkbox check in Wrire Check page
nice work
Keep it up.
Thanks so much
I am not getting an alert message when I click on edit, please help me out
There's not much I can do without seeing code and the Deployment. All I can say at the moment is to go through the steps in the video again and double-check you've done them all. You can also make sure your browser is not blocking popups on the page.
thank you
Thank you!
Dear Sir , m not getting checkbox for PAGE INIT FUNCTIONS , me getting little bit different interface .
Hi! are you still offering the suitescript course?
Tried to complete this and got this message from NS:
Fail to evaluate script: {"type":"error.SuiteScriptModuleLoaderError","name":"UNEXPECTED_ERROR","message":"syntax error (SS_SCRIPT_FOR_METADATA#10)","stack":[]}
how to call single function from script file when click button in webstore?
eric. script deployed but not showing any pop-up message
I'll just set the email field to mandatory ^__^
Better use workflows for that!
I would like to thank you. I have a problem, I followed all the steps and once I selected the File it asks to select SuiteScript API 1.0 not 2.0! how to change?
Your @NApiVersion tag is likely incorrect or missing.
The sign-up link doesn't work, please advise.
Hmm, this didn't work for me either. I've closely inspected the file I uploaded, but nothing popped up when I edited the corresponding record in NetSuite. Has something changed in NetSuite since this video was published?
/**
@NApiVersion 2.0
@NScriptType ClientScript
@NModuleScope Public
*/
define([], function () {
function showMessage() {
var message = "Hi There!";
alert(message);
}
return {
pageInit: showMessage
};
});
File looks fine; what about the Script and Deployment records?
@@StoicSoftware Script Record Screenshots - www.screencast.com/t/qbVBXjVYvI0 and www.screencast.com/t/ZMkG0IVe2Ns, and deployment record - www.screencast.com/t/tsIAhzdwCj
@@timpedersen3525 Are you blocking popups or alerts? Assuming your user is "BC Admin", this all looks fine. Try a `console.log` statement instead of an alert, and open the browser's developer console (usually F12) before you refresh the record page.
@@StoicSoftware No pop up blockers that I can see. I looked in the chrome extensions, and there aren't anythings like pop up blockers there. I attempted changing my alert to a console.log message, but I don't see anything in the console either. Here's a video - www.loom.com/share/a39e421d9bfa43d1bbe86b3d0d70890f
@@timpedersen3525 Your file doesn't have an extension. It must have a `.js` extension, or NetSuite won't know how to load it correctly.
I hope you can help me. I think my code is an exact copy of yours but I get this error. "SuiteScript 2.0 entry point scripts must implement one script type function." Can you help me? Thank you.
/**
@NApiVersion 2.0
@NScriptType ClientScript
@NModuleScope Public
*/
define([], function() {
function showMessage() {
var message = "Hello, Matt!";
alert(message);
}
return {
pageinit: showMessage
};
});
@@mabisoh It's `pageInit`, not `pageinit`; notice the capitalization.
@@StoicSoftware Thank you! Appreciate it very much.
Not new to programming but very new to netsuite. Is there a way to step through code and debug ?
There's a debugger environment, but I don't use it myself so I don't have too much advice for you there. Check out the Slack at netsuiteprofessionals.com/; definitely someone there who can help.
I am starting to learn SuiteScript, I am a Functional Consultant and want to go for extra skills. Which would you recommend for me, 1.0 or 2.0? We are currently using 1.0 on our company. Thanks!
I just wrote about this *exact* topic for the Effective SuiteScript mailing list this week; once that email goes out on Thursday. I will post my response and reasoning publicly as well.
Short Answer: Start with 2.0.
hmmm.. ok ok, but I already started on 1.0. I'll just push my self for 2.0. Any advantage on using 2.0?
There are many advantages to 2.0. I go through some of them in the SS2 Modules video: ruclips.net/video/YdPFCYZijPY/видео.html but the biggest advantage is going to be that moving forward, all new SuiteScript features will be added to 2.0, but not 1.0.
Some of these new features already exist, like SFTP and the new Map/Reduce script type. New SDF and CLI functionality will only be added to 2.0. Basically, 1.0 will only get further and further behind.
As promised, here is my public response to this question: stoic.software/why-ss2/
Is there any reason that you don't link Eclipse to Netsuite to take advantage of intellisense and other useful features? Just starting Netsuite at my job and was curious.
I do use WebStorm with a NetSuite plugin and an npm-based build pipeline when writing code. When I'm teaching someone that has never seen code before to write a script, introducing an IDE is just way too much overhead and overwhelming.
Makes sense. Ok, I'd never heard of webstorm before. I'll look into it. Do you know of a good way to version control NetSuite?
Also, I apologize if this is a very foolish question, but what do you mean by an "npm-based build pipeline when writing code".
I use git for all of my version control (check out gitlab.com/stoicsoftware for my public repos). I use a branching scheme similar to gitflow (www.atlassian.com/git/tutorials/comparing-workflows#gitflow-workflow).
I also build all my NetSuite customizations as npm packages (www.npmjs.com/). I use npm build scripts to run ESLint, JSDoc, and mocha unit tests on my project.
Ok, very cool. Yeah I was curious about looking into Unit Test for NetSuite. I've never written unit test, which I know is lazy lol, but I plan on doing so this go around as I start fiddling with NetSuite.
Thanks for your responses. Love the videos.
any idea of NetSuite SuiteTalk ?
Thanks this is very helpful. I am looking to write a custom workflow action that would grey-out a specified transaction column line field. Any ideas please. I have attempted this but no joy at the moment . My code below:
/**
*@NApiVersion 2.0
*@NScriptType WorkflowActionScript
*@NModuleScope SameAccount
*/
define(['N/record'], function(){
function greyOut(cr){
if (cr.mode == 'edit'){
var cr = cr.currentRecord;
var sl = cr.getSublist({sublistId: 'item',field: 'quantity'});
sl.isDiable = true;
}
}
});
Do not click the link in his description, not a good website.
Oof thank you for pointing this out to me; I let the domain registration on that site lapse. I'm updating the description on all the videos with a real, appropriate link to my blog archives.
what is extension of file for suitescript ?
SuiteScript is just a library on top of Javascript so the file extension is .js
Hi eric you still active?
Active I am.