Hats off to you sir. So brilliantly and in simple words you have explained almost every features in SNOW that a naive developer can also be able to understand this.Need more videos like this sir with some practical examples.
Dada, one thing... We should use the getUniqeValue() because if we do dom manipulation and try the same code for service portal, it will give the error...
Thanks for your efforts !! In-Service Portal getting submitted without attachment also. 1. Alternate we have a checkbox in portal setting "Mandatory Attachment". on checking we cant submit without attachment. 2. On the Hiding "Add Attachments" button using "Hide Attachment" checkbox in portal settings and on adding the new variable type "Attachment" and we can make it mandatory.
Hi, This is a fantastic tutorial I am doing this on Washington and it is still very relevant. Can you share a link to the requirements excel document please? I cannot find int on your website.
Thanks for ur efforts. I have got following error while ordering this catalog item. onSubmit script error: TypeError:gel is not a function: function () {[native code]} Plz help.
Thank you Sir for such knowledgeable video. I wanted to ask that have you attached any particular file as attachment, because when I added a .txt file, the alert is getting popped up again and again for providing a Pass certification. Can you please help with that?
Hi sir, i was tried same requirement and all code also good but every time when i am trying to submit order , facing attachment popup and not able to submit order..pls help me on this sir..
I have written same as you written, but for me triggering error "Error MessageonSubmit script error: TypeError: gel is not a function: function () { [native code] }". Please suggest how to clear the error
Hi... In place of this function -> var catalogsysid= gel('sysparm_item_guid').value; so you can use this below function in client script i.e var catalogsysid = 'sysparm_item_guid'.value; then you won't get any error
I am getting an error when I DO have an attachment: Here is a copy of the Catalog Client Script: function onSubmit() { //Validate that an attachment has been attached var catalogSysID = gel('sysparm_item_guid').value; var checkAttachmentGA = new GlideAjax('CheckAttachment'); checkAttachmentGA.addParam('sysparm_name', 'attachmentCount'); checkAttachmentGA.addParam('sysparm_catalogsysid', catalogSysID); checkAttachmentGA.getXMLWait(); var attCount = checkAttachmentGA.getAnswer(); if (attCount < 1){ alert('Please attach your passed Certification'); return false; } else { return true; } } Anybody see I typo I am missing? The code works if I Don't have an attachment so this is really strange.
The error you are getting is because the gel() function is not available in Service Portal. This function is used in the classic UI, but it has been deprecated in favor of the g_form.getElement() function. To fix the error, you can update the code to use the g_form.getElement() function instead of the gel() function. The following code shows the updated code:
Thanks for such a pin to pin explanation of service now feature. I understand correctly.
Hats off to you sir. So brilliantly and in simple words you have explained almost every features in SNOW that a naive developer can also be able to understand this.Need more videos like this sir with some practical examples.
3 sessions are very helpful ..Thank you for ur time and efforts
hai I'm from India your sessions are very helpful for our knowledge. so please continue and upload part 4 training fast
Keep up the good work... Thanks for the knowledge... Appreciated!!!
Dada, one thing... We should use the getUniqeValue() because if we do dom manipulation and try the same code for service portal, it will give the error...
Thanks for your efforts !!
In-Service Portal getting submitted without attachment also.
1. Alternate we have a checkbox in portal setting "Mandatory Attachment". on checking we cant submit without attachment.
2. On the Hiding "Add Attachments" button using "Hide Attachment" checkbox in portal settings and on adding the new variable type "Attachment" and we can make it mandatory.
I want to learn script in Servicenow . Please suggest me how can I learn?
Thanks for sharing such videos which have practical examples. Could you also please upload further video on this, workflow and sla's.
Hi, This is a fantastic tutorial I am doing this on Washington and it is still very relevant.
Can you share a link to the requirements excel document please? I cannot find int on your website.
Thankful to you 🙏
:)
Hi, Could you please share the requirement regarding to this catalog item, it will be helpful for me.
Thanks for ur efforts.
I have got following error while ordering this catalog item.
onSubmit script error: TypeError:gel is not a function:
function () {[native code]}
Plz help.
have you unchecked the isolate script?
gel seems to be deprecated. google has some articles about this
Thank you Sir for such knowledgeable video. I wanted to ask that have you attached any particular file as attachment, because when I added a .txt file, the alert is getting popped up again and again for providing a Pass certification. Can you please help with that?
This will not working in portal...but working fine in native view
tried the same code or the validate attachment. while submitting the form its showing the error isNAN is not defined function() error
Can u please create more videos on next topics
Hi sir, i was tried same requirement and all code also good but every time when i am trying to submit order , facing attachment popup and not able to submit order..pls help me on this sir..
I have written same as you written, but for me triggering error "Error MessageonSubmit script error: TypeError: gel is not a function:
function () { [native code] }". Please suggest how to clear the error
Hi...
In place of this function -> var catalogsysid= gel('sysparm_item_guid').value; so you can use this below function in client script i.e var catalogsysid = 'sysparm_item_guid'.value; then you won't get any error
I am getting an error when I DO have an attachment:
Here is a copy of the Catalog Client Script:
function onSubmit() {
//Validate that an attachment has been attached
var catalogSysID = gel('sysparm_item_guid').value;
var checkAttachmentGA = new GlideAjax('CheckAttachment');
checkAttachmentGA.addParam('sysparm_name', 'attachmentCount');
checkAttachmentGA.addParam('sysparm_catalogsysid', catalogSysID);
checkAttachmentGA.getXMLWait();
var attCount = checkAttachmentGA.getAnswer();
if (attCount < 1){
alert('Please attach your passed Certification');
return false;
} else {
return true;
}
}
Anybody see I typo I am missing?
The code works if I Don't have an attachment so this is really strange.
The error you are getting is because the gel() function is not available in Service Portal. This function is used in the classic UI, but it has been deprecated in favor of the g_form.getElement() function.
To fix the error, you can update the code to use the g_form.getElement() function instead of the gel() function. The following code shows the updated code:
If any applicable to help them pls give me solution to fix this code