I Wants to get the server Date in Dynamic crm 2011
through new Date() i am getting only the system time.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your question really isn’t very unclear Hashim. You are trying
new Date();which is JScript. As this is client-side it will not look to the server to retrieve the date and hence you get local system time rather than server time.You will need code to execute on the server-side to get server time. One solution is a plugin and you would simply use
var myDate = DateTime.Now;to get the current system time.You haven’t elaborated on how you wish to use this so I can’t tell you what to do with this value now you have it – but perhaps you are using it to populate an entity attribute, e.g. in a pre-update plugin: