@ghdunn
Please try to Create a new Web Resource to hold the JScript. This JScript Library should contain the following code:
// Prefill a Date Field with Todays Date
function SetToday(date)
{
var isCreateForm = Xrm.Page.ui.getFormType() == 1;
var dateField = Xrm.Page.getAttribute(date);
if (isCreateForm) // Check that this is a new Record
{ dateField.setValue(new Date()); // Set the Date field to Today
dateField.setSubmitMode("always"); // Save Disabled Fields
}
}
To install:
1. Create a Web Resource and add the above script to the Web Resource
2. Add the Web Resource as a Form library and set the forms OnLoad event to the SetToday Function.
a. Customize the form, select FormProperties, Events Tab.
b. Add a Library, Under EventHandlers, Control = Form, Event=OnLoad
c. In the function field, type in "SetToday"
d. In the box that says "comma separated list of parameters that will be passed to the function" add the Schema Name of the field you wish to default as a parameter. Schema Name must be in double quotes (ie. "myfield_schemaname")
Sik