locked
In crm 2013 the AttributeInfo.GetValue returns wrong value RRS feed

  • Question

  • We are experiencing a strange issue, which can be reproduced by following below steps:

    1. Open New Task (Or any other entity)
    2. Enter text “Test Subject” in “Subject” field (or use any other field).
    3. Use this Xrm.Page.getAttribute("subject").getValue(); statement to get the value of subject’s field, it will return “Test Subject”.
    4. Now clear the subject field.
    5. Use this Xrm.Page.getAttribute("subject").getValue(); statement to get the value of subject’s field, it will return “Test Subject”, which is wrong value, the subject field is empty.

    The Xrm.Page.getAttribute("subject").getValue() returns wrong value. We checked this issue in CRM 2011 and its ok the issue is specific to CRM 2013.


    Waheed

    Tuesday, November 12, 2013 6:53 AM

All replies

  • Could you please let us know, which event handler are you using attaching your code and share your entire code as well ?



    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !


    • Edited by _Vikram Tuesday, November 12, 2013 9:25 AM
    Tuesday, November 12, 2013 9:24 AM
  • This may or may not be relevant, but is AutoSave enabled or not, and does changing this affect the behaviour ?

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, November 12, 2013 4:23 PM
    Moderator
  • Did someone found a solution for that problem?

    I get the exact same odd behavior in a custom entity lookup. The odd behavior appears only if the lookup is mandatory.

    Thanks,

    neronotte


    neronotte

    Wednesday, June 11, 2014 11:52 AM
  • After clearing the field first save it and then check the results

    Regards Faisal

    Wednesday, June 11, 2014 2:30 PM