Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Unable to submit the catalog item on Service portal.

Swathi P
Tera Guru

Hi All,

 

While trying to submit the request through portal. It just says Submitting..... When i inspect the portal it says on console that could not find UI Action.

 

Please suggest what is the error. I am not able to get the error.

 

find_real_file.png

1 ACCEPTED SOLUTION

Allen Andreas
Tera Patron

Hi,

It looks like maybe some sort of command (possibly issue with a g_form line) is causing issues in maybe the UI Action for submit? I would investigate this UI Action and see if anything was altered with it, if so, evaluate/troubleshoot and/or go back to OOB version.

Also try with another request item and see if you get the same result.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

11 REPLIES 11

Thank you so much for this!  I had been wrestling with this issue for weeks, and thought it was such a unique problem that I didn't even bother to check the community.  I came across your post today and it fixed my problem.  Thanks a million!!

Sweet, that fixed one problem when using producer.redirect on a record producer in portal with a checkbox.  However now my UI policy fails to reverse.

I tried using a Yes/No variable instead and got the same [NOACTION] again.  I tried adjusting the UI policy, using '' versus 'No', etc. and no dice.

I finally just went back to the original with the check boxes that was working before, but now the [NOACTION] isn't going away.  Setting the checkbox to '' isn't working anymore.

Jesse20
Tera Contributor

Had the same issue as OP, but I saw your comment and was wondering if you had tried one of these:

  • Clearing the field value with a 'falsy' value ("", 0, false (boolean), etc...)
  • Setting the dirty version of the form to false: g_form.submitted = false; 
  • Checking if the yes/no choice field behavior responded correctly when using 'true' or 'false' for Yes/yes and No/no conditionals? 

Assuming you tried the above already (since this is 2mo afterwards), I was wondering if you figured out what the issue was and if so, would you mind sharing :D? 

Thanks in advance!

Sorry for the delay!  I went down the list of different false values to try ("false", false, 0, '', null, etc.).  I gave it a shot with g_form and even tried setting with getElementById (on the record producer, not widget), and jQuery (try all the things!).  I even tried using a select box instead.  No dice. 

I want to say I tried g_form.submitted, but cannot confirm.  The new problem I ran into was that the form did stop submission when I wanted it to, but the "Submit" button was stuck on "Submitted" so it couldn't be clicked again to actually submit!

I ended up with a client script (below) for redirecting from a KB I *eventually* found on HI:

https://hi.service-now.com/kb_view.do?sysparm_article=KB0657429

When submitting a record in the Service Portal, users can be unexpectedly redirected to the record list page, without succeeding to actually submit the form

Related: https://hi.service-now.com/kb_view.do?sysparm_article=KB0715633

On the Service Portal form page in the London release, the UI action buttons (eg: "Save", "Cancel Request") don't work on the first click, the following warning appears in the browser console, g_form) [NOACTION] Could not find UI Action: none,

 

 

function onSubmit() {
	if(g_form.getValue('wo_number') == ''){
		g_form.addErrorMessage('Unable to find order number. blah blah blah stop form submit here blah blah');
		return false;
	}else{
		if(window === null){ //Portal version
			setTimeout(function(){ //From KB0657429 on HI
				top.window.location = '/meports?id=success';
			}, 3000);
			//console.log("Submitting");

		}else{  //Desktop version
			//jslog("Submitting");
			window.location = "/meports?id=success";
		}
	}
}

Jesse20
Tera Contributor

Sounds a lot like what I went through, but I'm glad you got it working :)! From what I remember, I think you can also use an alert() (after returning false) and it will prevent submission. I know it's a bit tedious, but it was a super quick 'fix' (even if temporary) that helped me ensure my other scripts weren't causing the problem. 

Thank you for sharing btw 🙂