Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

getValue returns incorrect value for duration field in 2013

Posted on by

When using Xrm.Page.getAttribute(arg).getValue() on a Duration type field it returns a string in crm 2013 (e.g. '2 hours') while in crm 2011 it returns the integer value (e.g. '120')

According to Microsoft its supposed to return a number value for any integer field regardless of the fields format

msdn.microsoft.com/.../gg334409.aspx

This seems to be a bug in crm 2013. Any idea how to get around this bug in crm 2013?

*This post is locked for comments

  • Aron R Profile Picture
    Aron R on at
    RE: getValue returns incorrect value for duration field in 2013

    Thanks for your answer. Not sure how I missed this when I reviewed the release notes initially :)

  • Aron R Profile Picture
    Aron R on at
    RE: getValue returns incorrect value for duration field in 2013

    On Prem.

    To be more specific the exact version is: (6.0.0.809) (DB 6.0.0.809)

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans