Setting Field Equal to Another Field

Sets a normal txt field equal to a lookup field if(crmForm.all.new_projectnameid.DataValue!=null) var applicationname = crmForm.all.new_projectnameid.DataValue[0].name; crmForm.all.new_applicationname.DataValue = applicationname; crmForm.all.new_applicationname.ForceSubmit = true; Sets a text field equal to another text field crmForm.all.new_applicationname=new_name; crmForm.all.new_applicationname.ForceSubmit = true; This ensures a lookup field (project name) is not empty and application is empty (application name) if (crmForm.all.new_projectnameid.DataValue!=null && crmForm.all.new_applicationname.DataValue==null ) [...]

Setting the Default Date of a form to the current date with Record Creation

THis script will set the default date of a form, this script is important because it sets the default date only for the Create form and not the update form. Otherwise the onload event will always set the date to the current date, even if its been updated. Credit to Sonomoa Partners. var CRM_FORM_TYPE_CREATE = [...]