locked
Setting the Scheduledstart Date/Time (Service Entity) RRS feed

  • Question

  • Hi,

     

    I need to default the Service Entity’s Start time (system name = Scheduledstart) to 09:00. At the moment it defaults to the time of days when the record is created.

     

    Can this be done using Java Script? My concern is the field is “Date/Time” type!

     

    Many thanks.

    Thursday, April 8, 2010 7:02 PM

Answers

  • Hi MSCRM MAN,

    Try this in method onLoad:

     

    var today = new Date( );
    today.setHours(09);
    today.setMinutes(00);
    crmForm.all.scheduledstart.DataValue = today;


    My Dynamics CRM Blog: http://bovoweb.blogspot.com
    • Marked as answer by MSCRM MAN Friday, April 9, 2010 3:20 PM
    Friday, April 9, 2010 12:09 AM

All replies

  • you can set the begining time of service activity as follows

    Go to customization -> Business management -> Services -> Open relevant service (or you want to update all service)..

    here you can ste Beginnig at time..save the record...and when user selects service now in service activity ..it will default correctly now..

    Thursday, April 8, 2010 7:46 PM
    Answerer
  • Hi MayankP

     

    thanks for the response...I've tried that (in fact the Beginning Time / Start Activities Every / Default Duration have all been setup. The beginning time for all services is set to 09:00 but the start time attribute of the service activity record doesn't change (note: I'm doing  this directly from the Service activity form and not the schedule service activity form).

    Thursday, April 8, 2010 9:59 PM
  • Hi MSCRM MAN,

    Try this in method onLoad:

     

    var today = new Date( );
    today.setHours(09);
    today.setMinutes(00);
    crmForm.all.scheduledstart.DataValue = today;


    My Dynamics CRM Blog: http://bovoweb.blogspot.com
    • Marked as answer by MSCRM MAN Friday, April 9, 2010 3:20 PM
    Friday, April 9, 2010 12:09 AM
  • Hi,

     

    I've tried the above code however the date and time still does default to what the code is telling it to. Any other ideas please?

     

    Thanks

    Friday, April 9, 2010 2:57 PM
  • Hi Got it working - I had the ALL DAY event attribute defaulted to YES. Setting it to no has now set the Scheduled Date and Time as expected.

     

    Thank you :)

    Friday, April 9, 2010 3:21 PM