Wednesday, March 28, 2012

Read only URLs cannot be opened

There is this annoying little issue whereby read only URLs on a CRM form cannot be opened. There really seems to be no rhyme or reason for such behavior as a URL by definition takes the user out of the context of the form and therefore I cannot fathom why such an action should be prevented.

The alternative is to make the field editable but that might not be an attractive alternative especially if you do not want this field to be updated!

I came across an interesting solution for this whereby you can keep the field editable but just remove the option of, ...well..., editing the field. To me it just seems like a different way of making a field read only that doesn't suppress the ability to open the link. And that works for me...

To do so, leave the field editable on the form and place the following line in you onload form jscript:

document.all.websiteurl.contentEditable = "false";

Replace "websiteurl" with the URL field you are working. The result is that the field appears editable on the form but if you try and edit, you will not be able to. Double clicking on the field will launch the URL specified.

I do not think this is supported script so use discretion in applying.

No comments:

Post a Comment