Solved

Changing defaults for time fields in CRM

Posted on 2014-02-09
3
811 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
Comment Utility
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
Comment Utility
Cool, how do you get to the source code for that particular field?
0
 
LVL 19

Expert Comment

by:Rikin Shah
Comment Utility
Hi,

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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

On Sep 22nd 2014 Microsoft released Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1 and back in July Update Rollup 3 was released.  So we now have:   Update Rollup 1Update Rollup 2Update Rollup 3Service Pack 1Update Rollup 1 for S…
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now