Can't read last set field value when executing ribbon button RRS feed

  • Question

  • I have this Problem: When i fill the "name" attribute af an account and click directly on a custom button in the Toolbar without clicking elsewhere before, then I'm unable to get the value of the "name" attribute. It just gives me "null".


    But if I first leave the filed an click somewhere else and afterwards my custom button, then the script above shows me the correct value that I just entered into the "name" attribute.

    It seams that CRM 2013 does not correctly remove the focus from the field when clicking directly on a button.

    Can anyone help me?

    Thomas Flückiger Flückiger Informatik http://www.f-in.ch

    Tuesday, February 18, 2014 3:11 PM

All replies

  • Hi

    Did you check that your information is getting saved before you click on the ribbon button.

    It could be a data saving issue instead of focus.

    Tuesday, February 18, 2014 3:27 PM
  • Perhaps you need to do Xrm.Page.getAttribute('name').fireOnChange() first?
    Tuesday, February 18, 2014 7:59 PM
  • in my experience this is browser dependent, ironically Chrome will update but not IE, is this what you see?
    Tuesday, February 18, 2014 8:59 PM
  • Thanks a lot for all your posts on this topic!

    @CRMDevlpr: I don't want to save the data first. I Need this to run also on a unsaved form.

    @JBlaeske: I also tested that Approach, but it did not help :-(

    @Chris_Cohen: I tested with IE, Chrome and Firefox and have the same Problem on all These Browsers...

    The strange thing is: In CRM 2011 I just had to set the focus to an other control and then it worked. In CRM 2013 this does not work anymore. Any other sugestions?

    Thomas Flückiger Flückiger Informatik http://www.f-in.ch

    • Edited by Flück Tuesday, February 18, 2014 10:28 PM
    Tuesday, February 18, 2014 10:28 PM