Calculate age but no need to store in CRM RRS feed

  • Question

  • Hi all,

    I would like to show the age of a contact (from birthdate) but don't want to create a custom field and no need to store the value in CRM.  Any workaround?  Thanks.


    Thursday, September 11, 2014 4:29 AM

All replies

  • You can create an HTML web resource.

    Inside you can use this javascript


    you need to adapt it to display the value in your web resource instead of doing an alert and access the parent Xrm object (so instead of Xrm.Page you need to do something like window.parent.Xrm.Page)

    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Proposed as answer by Guido PreiteMVP Thursday, September 11, 2014 4:43 AM
    Thursday, September 11, 2014 4:42 AM
  • Use javascript to call crm sdk to get the value then calculate and render it on the field. This should fulfill your needs.

    Then register this javascript function in the onload function of the form and the onchange function of the contact birthdate(In case you need to change the contact birth).

    Tuesday, September 16, 2014 5:39 AM