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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Field Service forum

Date and Time Field

(0) ShareShare
ReportReport
Posted on by

We would like to have a field that our dispatches and either select a date and inputs the current time.

Currently the only option I get is the time is in 30 mins increments . We would like to have the ability to have a timestamp function that my we can just check a box and input the current date and time in the field in that field.

If anyone could please and thank you 

Categories:
I have the same question (0)
  • Suggested answer
    moko33 Profile Picture
    1,788 on at

    Have you tried a combination of Business Rule and Calculated Field?

    Otherwise JavaScript.

  • Community Member Profile Picture
    on at

    Do you have any suggesting on how to do that?

    We wouldn't care if the date/time field would just fill in the current time once you pick the date. Cause the Customer Portal does exactly that and its using the same form and field that the Dynamic 365 CRM form( case - Web create Form) does and we you are input the date in the CRM form not through the portal it just has the time in increments of 30mins... So frustrating. Any suggest would help thank you!

  • Suggested answer
    moko33 Profile Picture
    1,788 on at

    After having testet it I would recommend:

    1. Create a new field as your checkbox: Two Option Set i.e. "Set Current Time". Put it on the form.

    and then either with Business Rule:

    2a. Create a Business Rule with Scope "Entity". Condition: if "Set Current Time" equals "Yes" AND "Time From Promised" (and/or other fields) does not contain data THEN Set "Time From Promised" to "Modified On".

    If you want, ad Action(s) for other fields as well . Works also with "Date Window Start" and "Time Window Start".

    or 2b) with Java Script: please search this forum for code examples on how to set now() via JS.

    The difference is: with a) you're able to see the filled in timestamps on the form only after the record was saved the first time whereas with b) you would be able to immediately see the filled in timestamps.

    A calculated field is uncomfortable because it gets calculated only when saving the record a first time. So you would need to savo your record even a second time then to copy its value into other fields.

  • Community Member Profile Picture
    on at

    So, I don't think, it worked. It looks like it doing nothing different. 

    B_5F00_Rule.png

    B_5F00_Rule_5F00_Active.png

    Form.png

    I would like when you pick the date it auto fills the time....

  • Suggested answer
    moko33 Profile Picture
    1,788 on at

    For the business rule: have you set the Scope to: Entity? Also the field providing the date (ModifiedOn) should be on the form so that it gets loaded by the client.

    However this would fill out the whole date and time, but not only the time field.

    If you want to adjust only the time which is auto-populated, I'm not sure if you could address this field with JavaScript. However a Business Rule doesn't help here.

    Maybe also a custom control (Canvas PowerApp) could do the job for you.

  • Community Member Profile Picture
    on at

    So the business rule is set to Entity:

    5700.B_5F00_Rule_5F00_Active.png

    I publish all customization and rule is activated

    5700.B_5F00_Rule_5F00_Active.png

     But for some reason very time a check the box it does not input the date and time.

    8032.Form.png

  • moko33 Profile Picture
    1,788 on at

    Hi RolandR,

    for me that works and my Business Rule looks exactly like yours.

    The timestamp gets filled in only when you click Save after you had checked the checkbox. So that the filled timestamp is visible on the form only after the first time save.

    Also I found out that the "Modified On" doesn't need to be on the form.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Field Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans