CRM2011 – Make URL Fields clickable In Read-Only Forms

In CRM2011 this functionality changed and all fields are always totally disable. Javascript helps us to fix it:
In CRM4 we did not have this problem.

function OnLoad() {
    if (Xrm.Page.ui.getFormType() == 4) //Read-only forms
    {
          Xrm.Page.ui.controls.get("attributename").setDisabled(false);
          Xrm.Page.getAttribute("attributename").setSubmitMode("never");
    }
}

Now we can make a double clicked to launch the URL.
users can still change the field but since the form is still in read-only mode, the save button is disabled.
With

Xrm.Page.getAttribute("attributename").setSubmitMode("never") 

we suppress the pop up warning that the field is dirty.

Lascia un commento

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...