locked
Adding image to Contact Entity RRS feed

  • Question

  • Hi,

    I need to add image to the contact entity's form.

    is that possible to add??

    if then please help me??

    Thursday, July 1, 2010 10:20 AM

Answers

All replies

  • Hi,

    I followed the above link and added the below code in the onload event of account entity.


    1. var  accountLogo =  "/isv/images/accounts/missing.gif" ;  
    2. If (crmForm.accountnumber.DataValue != null )  
    3. {  
    4.     accountLogo = "/isv/images/accounts/"  + crmForm.accountnumber.DataValue +  ".gif" ;  
    5. }  
    6. document.all.IFRAME_accountlogo.src = accountLogo;

    I am getting the below error.

     

    There was an error with the field's customized event.

    Field : window

    Event : Onload

    Error : object expected.

    Am i missing anything???

     

    Thursday, July 1, 2010 11:07 AM
  • Hi,

    You can display the image in an IFRAME.

     

    Please have a look at the following urls

    http://mscrm4ever.blogspot.com/

    http://mscrm4ever.blogspot.com/2009/02/displaying-image-in-iframe.html

     

    Thanks

    Divya


    Thanks Divya Ananth Our greatest glory is not in never falling but in rising every time we fall.
    • Proposed as answer by Divya Sekaran Thursday, July 1, 2010 11:07 AM
    Thursday, July 1, 2010 11:07 AM
  • Hi,

    I followed the above link and added the below code in the onload event of account entity.

    I used IFrame only to do this.


    1. var  accountLogo =  "/isv/images/accounts/missing.gif" ;  
    2. If (crmForm.accountnumber.DataValue != null )  
    3. {  
    4.     accountLogo = "/isv/images/accounts/"  + crmForm.accountnumber.DataValue +  ".gif" ;  
    5. }  
    6. document.all.IFRAME_accountlogo.src = accountLogo;

    I am getting the below error.

     

    There was an error with the field's customized event.

    Field : window

    Event : Onload

    Error : object expected.

    Am i missing anything???

    Thursday, July 1, 2010 11:35 AM
  • Hi Manthan....

    1. var  accountLogo =  "/isv/images/accounts/missing.gif" ;  
    2. If (crmForm.accountnumber.DataValue != null )   ---------------- Here u will be required to write crmForm.all.accountnumber.DataValue
    3. {  
    4.     accountLogo = "/isv/images/accounts/"  + crmForm.accountnumber.DataValue +  ".gif" ;   --------------- same as above
    5. }  
    6. document.all.IFRAME_accountlogo.src = accountLogo;

    Hope this helps....

     

    Regards,

    Vikas Chitale.

    Thursday, July 1, 2010 12:02 PM
  • Hi,

    I followed the below link,

    http://mscrm4ever.blogspot.com/

    here they have added a open dialog for selecting the image.

    How can i do that? I can't find any way to do that??

    Any suggestion???

    Thursday, July 1, 2010 12:15 PM
  • It may be too late for the original poster, but in a post-"Update Rollup 7" environment, some of the suggestions provided above simply won't work.  There's an update to the matter of displaying an image, which is attached as a file (through the Annotation entity) to a record in CRM, in an Iframe, as developed by Tito-Z .
    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Saturday, November 6, 2010 6:59 AM
    Moderator