You need to sign in to do that
Don't have an account?

I can't schedule thru the list view button
Hi All,
I written the code for calling hte schedule class from button ................But it's not scheduling , i dont knw where i did mistake
Here is my code
I have taken the ref code is this
Siv
I written the code for calling hte schedule class from button ................But it's not scheduling , i dont knw where i did mistake
Here is my code
var d = new Date(); var h = d.getHours(); var m = d.getMinutes(); var s = d.getSeconds() + 15; var mn = d.getMonth()+1; var y = d.getFullYear(); var weekday = new Array(7); weekday[0] = "Sunday"; weekday[1] = "Monday"; weekday[2] = "Tuesday"; weekday[3] = "Wednesday"; weekday[4] = "Thursday"; weekday[5] = "Friday"; weekday[6] = "Saturday"; var n = weekday[d.getDay()]; var nextFireTime = s + ' ' + m + ' ' + h + ' ' + n + ' ' + mn + '?' + y ; alert(nextFireTime); var scr="system.schedule('Run the Batch', '" + nextFireTime +"', new Schedularclassname());"
I have taken the ref code is this
String sch= String.valueOf(newtime.second()) +' ' + String.valueOf(newtime.minute()) + ' ' + String.valueOf(newTime.hour()) + ' ' + String.valueOf(newTime.day()) + ' ' + String.valueOf(newTime.month()) + ' ? ' + String.valueOf(newTime.year());Adv Thnx
Siv
Regards,
Rahul
d.getDay() function is not working .....so i have taken weekdays