Retrieve EntityImage URL of the record in CRM 2013 and 2015

Entity Image URL

CRM gives us the relative URL of the entity image which can used directly.

Here is the code of it.

string strEntityImageURL = string.Empty;

Entity entObject = objService.Retrieve(“contact”, new Guid(“00000000-0000-0000-0000-000000000000”), new ColumnSet(new string[] { “entityimage_url” }));
if (entObject != null && entObject.Contains(“entityimage_url”))
{
    strEntityImageURL = entObject.Attributes[“entityimage_url”].ToString();
}


Happy CRM’img
Gopinath

 

2 thoughts on “Retrieve EntityImage URL of the record in CRM 2013 and 2015

  1. Microsoft CRM June 10, 2016 / 5:26 am

    Hi Ganapath,After retrive the Entity Image URL ,then how to update the contact record picture. I tried updating the contact just simply it is replacing the url but actuall it is not updating the existing picture with new picture Could you please let me know if anything works for me.my contact : babubura@gmail.com

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s