2

I'm writing a custom typescript page for a scan module. When a code is scanned a datetime field on a CRM record needs to be updated.

Here is my code:

XrmQuery.update(x => x.cgk_bonuses,
            this.bonusId(),
            { cgk_datescan: new Date() }) 
            .execute(id => { });

Does anyone know what I'm doing wrong for updating a datetime field? Update other fields works fine.

Batsman
  • 87
  • 8

2 Answers2

3

It looks like you have found a bug in relation to updating Date and Time fields in CRM through XrmQuery.

I have created an issue for us to follow up on this: XrmQuery: Debug sending dates to CRM

Henrik H
  • 5,747
  • 1
  • 21
  • 33
3

This issue has now been fixed in version 2.3.7

https://www.nuget.org/packages/Delegate.XrmDefinitelyTyped/

Magesoe
  • 135
  • 1
  • 7