Solved

Changing defaults for time fields in CRM

Posted on 2014-02-09
3
834 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
[X]
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
  • 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

This is a walkthrough guide I wrote whilst upgrading my on-premise MS Dynamics CRM 3.0 deployment to 4.0. This covers the actual installation of the product to a working level for my system, I ran into a lot of issues that the steps below fixed so h…
Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part I
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

696 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