Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Changing defaults for time fields in CRM

Posted on 2014-02-09
3
832 Views
Last Modified: 2014-02-18
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
Comment
Question by:Ozwazza
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
Rikin Shah earned 500 total points
ID: 39846491
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
 

Author Comment

by:Ozwazza
ID: 39854975
Cool, how do you get to the source code for that particular field?
0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 39855175
Hi,

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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part I
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question