Tuesday, June 15, 2010

CRM 4.0 Network Resource Image Control

As the name suggest this is an on-premise / VPN solution so consider if you need this to work across the web / IFD. The idea is to utilize a simple network share together with VB 6.0 Common Control Open Dialog which can be summoned using JavaScript. The nice thing about the Dialog is that it enables you to see files as thumbnails, set the initial directory and return the selected image path into a text attribute. That’s pretty much what you need to make this work.

You can add an ISV toolbar button to pop the dialog but I find that this solution works hand in glove with the text image button post I wrote a while ago.
Here is what is did in a nut shell:
Create a Add a new text attribute. I used the pager attribute on the contact form for the sake of this example.
Add a new Fixed Field 1:1 section to the contact form. This is done so the IFRAME
that displays the image will occupy half the screen.

Then add a the image IFRAME and pointed it to a default blank.jpg image.

Arrange the form attributes as you like … here is what I did.

Set the path attribute to read-only so selection is possible only when using the dialog.
Add the following code to the contact on load event box.

And Finally create a network share anywhere on the server and set appropriate user permission.

That’s it … pretty simple ah … feel free to comment.

No comments:

Post a Comment