• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 892
  • Last Modified:

Changing defaults for time fields in CRM

Hello, I am starting to create a CRM package.  Can anyone tell me how can I change the default setting for the time field in a form?  If I setup a time field in the form for appointments the default sets to 12:30am.  How can I change it so it starts at 8:30

Regards
Warren
0
Ozwazza
Asked:
Ozwazza
  • 2
1 Solution
 
Rikin ShahMicrosoft Dynamics CRM ConsultantCommented:
Hi,

You mean for all appointments the default time selected would be 8.30, correct?

var d = new Date();
var date = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 8, 30, 0, 0);
Xrm.Page.getAttribute(<"appointmentStartAttribute">).setValue(date);

Open in new window


Replace Appointment Start Attribute name with <"appointmentStartAttribute"> in above code.
0
 
OzwazzaAuthor Commented:
Cool, how do you get to the source code for that particular field?
0
 
Rikin ShahMicrosoft Dynamics CRM ConsultantCommented:
Hi,

You can go to design mode from customization for this entity and check the logical name of the field.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now