Hello there!,
I am using following script to add days in date
function OnLoad()
{
Xrm.Page.getAttribute("hs_dispatchdate").addOnChange(DateOrDaysOnChange);
Xrm.Page.getAttribute("hs_datevalue").addOnChange(DateOrDaysOnChange);
}
function DateOrDaysOnChange()
{
var dateform = Xrm.Page.getAttribute("hs_arrivaldate").getValue();
var adddays = Xrm.Page.getAttribute("hs_datevalue").getValue();
Var newDate = newDate(dateform);
newdate.setDate(newdate.getDate() + adddays);
Xrm.Page.getAtrribute("hs_arrivaldate").setValue(newdate);
}
but facing some turboform error
ReferenceError: DateOrDaysOnChange is not defined
at eval (eval at RunHandlerInternal (methodexsystemsltd.crm5.dynamics.com/.../ClientApiWrapper.aspx), <anonymous>:1:1)
at RunHandlerInternal (methodexsystemsltd.crm5.dynamics.com/.../ClientApiWrapper.aspx)
at RunHandlers (methodexsystemsltd.crm5.dynamics.com/.../ClientApiWrapper.aspx)
at ExecuteHandler (methodexsystemsltd.crm5.dynamics.com/.../ClientApiWrapper.aspx)
at Mscrm.TurboForm.Control.CustomScriptsManager.$Df_1 (methodexsystemsltd.crm5.dynamics.com/.../formcontrols.js)
at Mscrm.TurboForm.Control.CustomScriptsManager.executeHandler (methodexsystemsltd.crm5.dynamics.com/.../formcontrols.js)
at Mscrm.TurboForm.Control.CustomScriptsManager.executeHandlerByDescriptor (methodexsystemsltd.crm5.dynamics.com/.../formcontrols.js)
at methodexsystemsltd.crm5.dynamics.com/.../formcontrols.js
at methodexsystemsltd.crm5.dynamics.com/.../global.ashx
at Mscrm.TurboForm.Control.Data.DateTimeDataAttribute.fireOnChange (methodexsystemsltd.crm5.dynamics.com/.../formcontrols.js)
Please help!
Thanks in Advance