Need confirmation when submitting a Record Producer

vidhya_mouli
Giga Sage

I have written onsubmit client script which will ask for confirmation before submitting the record producer. 

vidhya_mouli_0-1717517537275.png

 

 

 

 

I get the message (see attachemnt), but when I click on cancel, it is still submitting the record. How to avoid this?

1 ACCEPTED SOLUTION

vidhya_mouli
Giga Sage

Realized that having a confirmation (validation) box when using async ajax is impossible. So taking tip from this video, I created a check box, which user has to check every time some value changes in the RP. Had to create many catalog client scripts that will trigger this calculation when the respective value changes.

View solution in original post

7 REPLIES 7

HrishabhKumar
Kilo Sage

Hi @vidhya_mouli 

I've tried to execute this same logic in a different way, it worked for me. I'm providing the modified if, else condition, try this in your code.

if(answer == true){
	//g_form.addInfoMessage("you have selected yes!");
   }
   else{
	//g_form.addErrorMessage("You have selected No");
	return false;
   }

 

Hope this helps you.

 

kayserie
Giga Contributor

Could this problem be related to cookies?

vidhya_mouli
Giga Sage

Realized that having a confirmation (validation) box when using async ajax is impossible. So taking tip from this video, I created a check box, which user has to check every time some value changes in the RP. Had to create many catalog client scripts that will trigger this calculation when the respective value changes.