web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Set a default time in the Activity>Phone Call attribute

(0) ShareShare
ReportReport
Posted on by 390

Does anyone know how to set a default duration and time in the Phone Call Attribute under Activity>Task>Phone Call?  I've looked under attributes and I sure can't seem to find it anywhere.  Any help would be great!

 

Thanks

Sean

*This post is locked for comments

I have the same question (0)
  • Grzegorz Kalek Profile Picture
    4,210 on at

    Hi,

    You should use Duration(actualdurationminutes) and Due(scheduledend)

    If you want to set default values for these fields you can add javascript to the onload event and update them when creating new form.

  • Sean A Profile Picture
    390 on at

    I am currently using the mentioned items.  However What is the javascript to use?  I'm a bit confused because I have the created on field used on the form and it populates automatically on the close, then the modified on does the same when the item is reopened.  Not sure which way to go here......

    Thanks for the response!

  • Grzegorz Kalek Profile Picture
    4,210 on at

    Add following code to your phone call onload event

    if(crmForm.FormType==1)
    {
      var d=new Date();
      d.setHours(d.getHours()+1);
      d.setMinutes(0);
      crmForm.all.scheduledend.DataValue=d;
      crmForm.all.actualdurationminutes.DataValue=15;
    }

  • Sean A Profile Picture
    390 on at

    THANK YOU SOOOOO MUCH!  I appreciate it.  I copy and pasted it but now can you help me understand it?

     

    var d=new date  means :

    Set hours - its getting the hours and adding one to the current?

    D: set minutes :

    crm datavalue=d

    crmForm - schedule duration dat value = 15 --- sets the duration to 15 minutes.

     

    Your a Lifesaver!!! Again - Thank you!

  • Community Member Profile Picture
    on at

    Sean, did you ever get this to work?  I want to do the same thing but I don't understand.  I know this is 4.5 years old now but it should still be the same.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans