Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

On Submit not working in order guides

kannann_
Kilo Expert

Hi All,

I have an order guide which has 4 catalog items associated with it. I have few On Submit catalog client scripts on these catalog items. They don't seem to work when I click checkout.

Please help.

Thanks,

Kannan

1 ACCEPTED SOLUTION

kannann_
Kilo Expert

Hey All,



I got the issue, the system property glide.sc.guide.tab.validate was set to false. I changed it to True and it is working fine now.


View solution in original post

17 REPLIES 17

JJ1
Kilo Guru

What is written inside these Catalog   Client Scripts ?


to check for variable values and display a alert and change the requested due date.


Did you check if the scripts are active and is attached to the right item ? just wanted to make sure that it is executed.Can you paste the script here


function onSubmit() {


    //Type appropriate comment here, and begin script below


  alert('iun');


  var total = 0;


  for(var i=1;i<9;i++)


  {


  var id = 'vs_capacity'+i;


  if(g_form.getValue(id) != '' && g_form.getValue(id)!= null && g_form.getValue(id)!= 'undefined')


  {


  var glideRecord = new GlideRecord('u_capacity_gb');


  glideRecord.addQuery('sys_id',g_form.getValue(id));


  glideRecord.query();


  glideRecord.next();


  total = total + parseInt(glideRecord.u_capacity);


  }


  }


  if(total > 300)


  {


  var due_date = g_form.getValue('due_date');


  var ga2 = new GlideAjax('AddDateToExistingDate');


  ga2.addParam('sysparm_name','getBusinessDueDate');


  ga2.addParam('sysparm_duedate',due_date);


  ga2.addParam('sysparm_days','1');


  ga2.getXMLWait();


  var dueDateGdt = ga2.getAnswer();


  g_form.setValue('due_date',dueDateGdt);


  alert('Minimum Lead time has been moved by 1 day due to Storage selection greater than 300 GB.\nNew Date: '+dueDateGdt);


  }




    //Type appropriate comment here, and begin script below


   


}