Solved

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

Posted on 2013-10-22
3
1,180 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
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…

828 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