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 365 | Integration, Dataverse...
Answered

setting a date time field in Javascript for Unified Interface

(0) ShareShare
ReportReport
Posted on by 15

Hi 

How does one set a datetime field in JS for UCII?

The standard formContext.getAttribute("xxx").setValue(new Date()); doesn't seem to work anymore throwing a 

Value should be of type: DateTime: Parameter Name: undefined

I have tried setting to UTC but to no avail. Any ideas? 

Thanks

Charmaine 

I have the same question (0)
  • Verified answer
    rthompson Profile Picture
    1,532 on at

    Try this

    //Add today's date

    var today = new Date();

                           formContext.getAttribute("new_assigntoengineeron").setValue(today);

  • Suggested answer
    Xmejni Profile Picture
    15 on at

    OMG i cant believe its that simple haha, thanks!

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

#3
ManoVerse Profile Picture

ManoVerse 53 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans