Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Update Field based on a different field

0
0

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.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles





Latest Images