onSubmit action used to calculate a service form date field
I'm wondering if this is possible with the onSubmit event., I have tried to get the Service/Requisition Due On date with the following namespaces:
var d = new Date();
d = Process.DueOn;
If it's possible, is this DueOn field a text or date type?
Coupla problems here:
(1) Namespaces are not active in a service form. Namespaces are strictly an artifact of the back-end business engine.
(2) You can't do this in an onSubmit event -- it's a timing issue. onSubmit events should not be used to update the values of form data. Populate the extra field you need in an onChange or onLoad event.
(3) The only way to get the service's due date would be to execute a fetch against the newScale requisition tables.
(4) Once you have av
if ( Moment == 'ordering' )
var oneDay =1000*60*60*24;
var myDate = document.getEle
We have been looking for a script that will calculate using Business days instead of calendar days.
I would certainly appreciate if you could share your script.
Yes, I will neeed to have to calculate business days after I'm able to fetch this information for my service. At your earliest, please share your script.
Daniel - Safeway
I forgot to mention, since this will run on the client side it will use whatever time the user has set. It will not convert timezones, etc. It also does Day calculations only, I did not include the hours, although it would be pretty easy to add to it. Was not worth the effort for me
Attached in calendar.zip please find:
cal.html - allows you to select a future installation date and calculates 10 day SLA in the past. This date can be used to fire of a task in the future.
bus.html - calculates 10 business days in the future from a provided date.