Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
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…

760 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

22 Experts available now in Live!

Get 1:1 Help Now