Solved

MS CRM 2011 JSCRIPT - Set Date and time in contract end date - not accepting my time

Posted on 2013-10-22
3
1,161 Views
Last Modified: 2013-10-28
1. I have experienced that it prints the incorrect date from a contracts end date on a schedule.
2. We capture the contract end date (Fieldname: "expireson") as 28th February but it prints
    1st March 2013.
3. I enquired on Experts-Exchange and they recommended that I must change the time
     when entering it in the form.
4. I made the field only a display field and populates it with JavaScript.  
5. I have attached my function in JavaScript.
6. The variable in which I set up the date and time is correctly populated.
7. I set the date for 08:00:00. (See on attachment)
8. When I print the contract schedule it prints still the incorrect date.
9. Looking in the data base I see the time value is populated as 22:59:59:000. See the SQL
    Query display in attachment.
10. I have changed the time value in my JavaScript to other values but it keeps changing it
      to this value.
11. I will appreciate help a lot. I do not know what to try anymore.
12. Thanking you in advance for your help.
function-DateAndTime-and-Results.doc
0
Comment
Question by:Pierre_Eksteen
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
Chinmay Patel earned 500 total points
ID: 39592161
Hi Pierre_Eksteen.

Are you sure there is no workflow/plugin being executed that can change this field in the background?

CRM stores datetime in UTC format and UI takes care of conversion so I don't think a script is needed here to prepare a datetime string.

Regards,
Chinmay.
0
 

Author Closing Comment

by:Pierre_Eksteen
ID: 39602595
Hallo Chinmay,

Just want to thank you for the direction and guideline. It was a view with a selection over the database table (contracts) that caused it with some scripting.

Thanks again.
Regards.
Pierre.
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 39605018
No problem Pierre. Glad I could help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Project Critical Path 4 90
Problem to setup 18 92
Phone number for Microsoft server activation issues 3 52
SCCM2012 sp2 CU3 cant see boot images missing tabs 3 57
I wanted to share this with fellow Experts, who might not know. How often have you wanted to learn something, only to be set back by either restrictions imposed on "trial" or "evaluation" software?  How often have you had to rebuild a home networ…
As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

930 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

17 Experts available now in Live!

Get 1:1 Help Now