locked
Javascript problem setting fields dynamically RRS feed

  • Question

  • Is it possible to do the following to dynamically populate the name of the field to be entered. For instance, instead of this:

    Xrm.Page.getAttribute("new_statusCode").setValue(true);

    I want to do this:

    var fieldname = new_statusCode;

    Xrm.Page.getAttribute("fieldname").setValue(true);

    I've tried the above but I get an error. What am I doing wrong?

    Tuesday, November 5, 2013 7:03 PM

All replies