ServiceNow IDE and ServiceNow Fluent (sdk v2) - Developer Advocate Demo
Hi everyone. It's Earl. The demo you're about to watch is the demo
that we showed off during the Xanadu episode of the TechNow webinar. I'll put that link in the description. That demo was recorded
before early availability release for Xanadu,
and things change quickly. this demo may look different
than what you experience, but good news. We have product managers
who want to show this off to you, and they will know all the details
of what is coming and the news. You can tune in live to Creator Toolbox tomorrow on this channel
as the experts themselves. instead of me,
demo it and answer your questions. I'll also add the link to that episode
in the description once it airs. But in the meantime, enjoy this demo and we'll see you tomorrow
on Creator Toolbox live. Thanks everyone. So I have two updates that I want to show you
all today. It's going to be really fun. the first is the ServiceNow IDE. That's right. We have a full IDE now
sitting inside of ServiceNow. this is a Visual Studio Code
implemented inside our ServiceNow instances
that we know and love. And I'm going to go ahead and demo it
to you. I'm going to go ahead and start by,
creating a new workspace. while I'm doing this I'm also going to
show off the ServiceNow SDK version two. But anyways, here's my new workspace. if you're familiar with GitHub
or Visual Studio, this is where you'll be able to do
all the normal stuff that you're used to. So full source control, you could, pull from repositories,
you can clone existing repositories. and you'll be able to do all that stuff
within this IDE. But for this demo, I'm
going to go ahead and create a new app. I'm going to name it. TechNow because this is a TechNow demo. Of course. Give it a short description here. Give it a scope. Name. And then it's going to bootstrap some of the app for me
including a little bit of a demo. And it's going to create some schema
some underlying files. It's going to incorporate
all of the ServiceNow code that we know and love, including
all the different modules that we'll need like glide record and glide system
and a bunch of extra stuff. So you'll see that in my starter script that it already had given me access
to business rules and client scripts. And so I'm going to write a client script
right now. You'll notice that I'm running it
in a different format called fluent. It's new in this SDK v2. One of the cool things also is because
this is all inside of our environment. When I start typing,
it has all the cool stuff that we know and love, like, showing us
exactly what is available to us. So when I typed type,
it knew to give me the option of onload, and I can write my scripts
directly into this. So if I hit the build button
in the background, our new fluent way of doing things
inside of the SDK will build my version of this app
and then deploy it immediately. And now, within the environment,
without having to leave, I can actually go check out my meta records
and actually see them in UI. And it goes both ways. That's right. So what I'm going to be able to do is type
in this script field and then save it. And then when I go back. You'll see that it automatically updates
because we want to make sure there's one source of truth for the records
and that they're always in sync. So it's a really cool
way to edit our client scripts, business roles and different
All via script, all via this new IDE
that is built directly into ServiceNow. So a lot more attractive to
some of us that are used to these traditional development
methods, So on the next example,
I'm going to create a business rule. And the thing I wanted to show you in
this example is that you'll notice that I have, my normal, intellisense,
but I have those red squiggly because it's telling me
that I don't have enough information yet, that it needs for it
to successfully build a business rule. It's all built into this framework. And so you'll see that I keep
having those red squiggles until I finish typing my fourth property, which is when,
and I'm going to put after. And then all that squiggly is go away. And so now it knows that I'm going
to be able to create this business rule without causing an error. Okay. Next thing I want to show is that script, I can actually go to this other file that I have script.js and you'll see that it already has
some ServiceNow script written into it. And instead of having to put it all in this one file,
I can actually call show state update from my other file. As long as I say import show state update from this other script.js file. And there you go. Now I'll be able to even control click
or command click through to find that exact function. So I'm going to go ahead and finish
writing this business rule and build in just like that client script. I'm going to go ahead
and reveal it in the other window. And here's my brand new business rule that I made entirely out of script. And just like before, I can add a new change, build it again. And then if I refresh my record. We'll see. That delete was added to my action. And just like we did before, I can go into my script file now and entirely in JavaScript in its own file,
I have the script that I want to use. So I'm going to I can make updates to this
script.js file and build the application and see that it will automatically
get pushed over to the business rule. And now I have a dedicated JavaScript
file just for that script. There it is. Earl says hi and now I will round this off
and say bye. But last things I want to mention
is that in this, new fluent framework, we don't just have
client scripts, and business rules we have are able to actually build
several new things, including. ACLs, lists, RestAPI. And even entire tables. We can build an entire table, via
this scripting interface. Awesome. And that's the SDK
v2 and new ServiceNow IDE.
https://www.youtube.com/watch?v=NcQDQj3tO1A