locked
How do I replace Crmform.all and .datavalue in prep for CRM fall '13 update RRS feed

  • Question

  • Hi.

    I've used the custom code validation tool at it warns me that crmform.all and .datevalue will no longer be supported after the fall '13 update - the code is below, can anyone point me in the right direction to fix it. (NOTE: I have obscured the dialog ID in the code below)

    Thanks in advance

    function RTCustom_populate_mtgdate()
    {
    // Code to perform your action.
    var date1 = null;
    if (crmForm.all.new_meetingdate.DataValue != null)
    {
    date1= crmForm.all.new_meetingdate.DataValue[0].name;
    alert(date1);
    }
    crmForm.all.new_mtgdate.DataValue = date1;
    }
    function open_close121_dialog() {
      window.open("/cs/dialog/rundialog.aspx?DialogId=%7bB7ECD113XXXXXXXX%7d&EntityName=new_salesmeeting&ObjectId=" + Xrm.Page.data.entity.getId());
      
    }
    function open_follow_up_dialog() {
      window.open("/cs/dialog/rundialog.aspx?DialogId=%7bB7ECD113XXXXXXXX%7d&EntityName=phonecall&ObjectId=" + Xrm.Page.data.entity.getId());
    }
    function open_reassign_dialog() {
        // If on a create form then save and reload sot he dialog can open
        //if(Xrm.Page.ui.getFormType() == 1)
        //{
         //   Xrm.Page.data.entity.save(null);
        //    return;
       // }
     // alert(Xrm.Page.getAttribute("new_attendancestatus").getValue());
     window.open("/cs/dialog/rundialog.aspx?DialogId=%7bB7ECD113XXXXXXXX%7d&EntityName=new_attendance&ObjectId=" + Xrm.Page.data.entity.getId());
      
      // If attendance status is certain value then trigger dialog
       // if (Xrm.Page.getAttribute("new_attendancestatus").getValue() == 'Provisional') {
          //  window.open("/" + Xrm.Page.context.getOrgUniqueName() + "/cs/dialog/rundialog.aspx?DialogId=%7bB7ECD113XXXXXXXX%7d&EntityName=new_attendance&ObjectId=" + Xrm.Page.data.entity.getId());
            // Set as being displayed so it doesn't trigger again on load
           // Xrm.Page.getAttribute("new_displayeddialog").setValue(true);
        //}
    }
    function opendialogonload() {
        if (Xrm.Page.getAttribute("new_displayeddialog").getValue() == null
          || Xrm.Page.getAttribute("new_displayeddialog").getValue() == false) {
            opendialog();
        }
    }

    Friday, December 20, 2013 2:35 PM

Answers

All replies