Dynamics CRM Support Blog
Problems configuring the CRM Outlook client? Use the wizard!
CRM Resource Center
FAQ About Technical SupportOnline | On-Premise
FAQ About Billing
Implementation Guide
Microsoft Dynamics CRM Developer Center and SDK
Good Morning,
I am trying to set up a JScript function that when triggered can populate another field.
I have a field called new_callstartdate which will contain the Start Date of a call and I want to automatically populate the field new_callenddate with a DateTime that is 10 minutes later.
Here is the code I am working with:
function myFunction(){var d2 = new Date(Xrm.Page.getAttribute("new_callstartdate").getValue());d2.setMinutes (Xrm.Page.getAttribute("new_callstartdate").getMinutes() + 10);Xrm.Page.getAttribute("new_callenddate").setValue (d2);}
I have managed to get it to populate the same time using
Xrm.Page.getAttribute("new_callenddate").setValue (Xrm.Page.getAttribute("new_callstartdate").getValue());
But can't work out how to add the ten minutes.
Any help would be massively appreciated.
Hi, Not sure if you can help me with this or if I should be asking somewhere else?
Really need to find a solution to this issue.
Thanks
Adam
Still hoping that someone can help on this as I am drawing blanks
Use the datejs library with your date manipulation scripts. It makes things so much more easy.
Xrm.Page.getAttribute("yourAttribute").setValue(Date.today().addMinutes(10));
See the documentation for the library at
code.google.com/.../datejs