Git Product home page Git Product logo

servicenowdevprogram / code-snippets Goto Github PK

View Code? Open in Web Editor NEW
251.0 251.0 511.0 15.24 MB

ServiceNow's Code Snippets community repository, managed by the Developer Program and the sndevs community.

Home Page: https://github.com/ServiceNowDevProgram/Hacktoberfest

JavaScript 91.37% HTML 4.77% CSS 1.07% SCSS 2.80%
hacktoberfest hacktoberfest-accepted hacktoberfest2021 hacktoberfest2022 hacktoberfest2023 servicenow

code-snippets's People

Contributors

23thom avatar 404paige avatar ajcooper72 avatar alikuttyka avatar allenandreas avatar anillande90 avatar ashu759 avatar danr2c2 avatar earlduque avatar eriemer1 avatar hrobarikt avatar iar42 avatar irston avatar ishaanshoor avatar jonahpiascik avatar kmohit2809 avatar lacah avatar litwilly avatar mr-swann avatar mrchrise avatar niamccash avatar oasif avatar ovarn avatar pranavbhagat18 avatar r3j3nt avatar radhe-manasa avatar rahmanm avatar rmedved84 avatar sn-ajb avatar sumanthdosapati avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

code-snippets's Issues

Cannot clone the repository after forking due to error

Hello,

I am not able to clone the repository after I have forked the project. Possibly a folder with incorrect name?
See error below:

Cloning into 'code-snippets'...
remote: Enumerating objects: 10527, done.
remote: Counting objects: 100% (1241/1241), done.
remote: Compressing objects: 100% (484/484), done.Receiving objects: 1% (106/10527)
remote: Total 10527 (delta 895), reused 1039 (delta 750), pack-reused 9286
Receiving objects: 100% (10527/10527), 13.70 MiB | 7.03 MiB/s, done.
Resolving deltas: 100% (4976/4976), done.
error: invalid path 'Background Scripts/Move Customer Updates /moveCustomerUpdates.js'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

window == null to determine if in service portal not working

I've seen a few references to using window == null when trying to determine if in the platform or service portal. This only seems to work in my Rome PDI if isolate script is set to false

if(window == null){ // For Service Portal
var url = top.location.href;
var value = new URLSearchParams(url).get('sysparm_id'); //provide the parameter name
console.log(value);
}
else{ //For Native UI
var glideURL = new GlideURL();
glideURL.setFromCurrent();
var id = glideURL.getParam("sysparm_id"); // provide the parameter name
console.log(id);
}

I've found a workaround by using a try/catch block like the following:

https://github.com/litwi1rm/code-snippets/blob/63e1a015cecc56611aec8e03523e4fc2f631e555/Catalog%20Client%20Script/Clear%20all%20fields/script.js#L11-L24

Has anybody else ran into this?

Replace standard Window methods with GlideModal equivalent

It is not recommended to use the standard Javascript Window methods for pop-ups. Let's get them replaced with GlideModal (or spModal for portal), i.e.:

Confirm

Alert

Found more? Feel free to add to the list!

Had a merged PR that fixes one or more of these? Tick 'em off!

Fix "Fix Scripts" folder

  • remove .DS_Store file from the parent folder
  • break up each function into it's own .js file

make sure to reference this issue if you submit a pull request to fix this,

Create a licensing file

Especially for starcoder reasons, if we open the license for this repository then it will only make the ServiceNow LLMs even stronger in the future.

Earl has to verify with legal first.

Get people's input on scores

Title Point
A commit has been pushed 1
An issue has been closed 2
A pull request has been opened 5
A pull request was closed but not merged 1
A new fork has been created 1
An issue has been opened 2

Add "invitations" check to "assign to me" workflow

In ServiceNow we just have an "approver" checkbox, but that just initiates the collaborator invitation. We need to add a stop to the workflow:

  1. do we know their github username?
  2. if yes, are they an approver in servicenow?
  3. if yes, are they still on the invitation list?
  4. if no, allow assignment

onChange client script defined on a MRVS is not working as expected

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}

var project = g_form.getReference('project_name', populateProjectNumber); 

}

function populateProjectNumber(project) {
g_form.setValue('project_number', project.u_project_number);
}

Update documentation to state that this is not a servicenow application repository

ServiceNowDevProgram has many repositories that can be imported directly into ServiceNow, this is not one of them; This repository is meant to be edited directly in GitHub or any other Git-enabled IDE like VS Code.

the root readme is overwritten automatically so changes to the readme should be done on .github/templates/rootreadmetemplate.md. Pull request changes to this file will only be approved if attached to this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.