- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2015 10:20 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2015 06:54 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2015 10:49 AM
What is written inside these Catalog Client Scripts ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2015 10:52 AM
to check for variable values and display a alert and change the requested due date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2015 10:58 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2015 11:15 AM
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
}