Sample code for using the CrmOnlineQueryManager on online version

 

const

 

 

 

 

string username = “myLiveId”;

 

 

 

conststring password = “myPassword”;

 

 

 

conststring organization = “myOrgName”;

 

 

 

publicstaticvoid LogError(Exception ex)

 

{

 

CrmOnlineQueryManager queryManager =

 

 

new CrmOnlineQueryManager();

 

 

 

var crmService = queryManager.Connect(username, password, organization);

 

DynamicEntity entity =

 

 

new DynamicEntity();

 

entity.Name =

 

 

“new_error”;

 

StringProperty exceptionType =

 

 

new StringProperty() { Name = “new_exceptiontype”, Value = ex.GetType().FullName };

 

StringProperty details =

 

 

new StringProperty() { Name = “new_details”, Value = ex.Message + “: “ + ex.StackTrace };

 

entity.Properties =

 

 

new Property[] { exceptionType, details };

 

crmService.Create(entity);

 

}

 

This entry was posted in MS Dynamic CRM 2011. Bookmark the permalink.

10 Responses to Sample code for using the CrmOnlineQueryManager on online version

  1. new dvds says:

    Most I can say is, I’m not sure what to comment! Except certainly, for the excellent tips which have been shared on this blog. I’ll think of a million fun methods to read the reports on this site. I think I will finally take a step employing your tips on that matter I could never have been able to manage alone. You were so innovative to allow me to be one of those to benefit from your beneficial information. Please realize how great I appreciate it.

  2. Most I can point out is, I’m not sure what to say! Except obviously, for the fantastic tips that are shared on this blog. I can think of a thousand fun tips on how to read the reports on this site. I’m sure I will finally make a move with your tips on those things I could never have been able to address alone. You were so careful to permit me to be one of those to learn from your helpful information. Please realize how much I enjoy the whole thing.

  3. aging says:

    It was a pleasure discovering your site a short while ago. I came up here now hoping to come across interesting things. I was not disappointed. Your ideas for new methods on this thing were topical and a terrific help to me. Thank you for creating time to create these things as well as for sharing your mind.

  4. Say thanks a lot for your time to have had these things together on this website. Mary and I very much liked your insight through your own articles over certain things. I am aware that you have a variety of demands on your own schedule and so the fact that a person like you took equally as much time just like you did to help people like us through this article is actually highly valued.

  5. We so appreciate your site post. You will discover hundreds of techniques we could put it to great use while using minimum effort in time and capital. Thank you so much regarding helping have the post give light to many questions we have had before now.

  6. We highly appreciate your site post. You will discover a lot of methods we could put it to great use with minimal effort in time and hard earned money. Thank you very much with regard to helping make the post reply many issues we have got before now.

  7. gold jewelry says:

    Could not thank you enough for the blogposts on your web-site. I know you put a lot of time and energy into these and hope you know how deeply I appreciate it. I hope I’ll do the same for someone else at some point.

  8. micro nichos says:

    Many thanks for your time and effort to have put these things together on this blog. Mary and that i very much treasured your knowledge through your own articles about certain things. I am aware that you have a variety of demands on schedule so the fact that you actually took just as much time like you did to guide people really like us by way of this article is even highly valued.

  9. Most I can express is, I am not sure what to really say! Except needless to say, for the amazing tips that are shared with this blog. I’ll think of a trillion fun tips on how to read the content articles on this site. I think I will ultimately take a step employing your tips on those things I could not have been able to take care of alone. You had been so thoughtful to permit me to be one of those to learn from your beneficial information. Please recognize how great I appreciate it.

  10. Could not thank you sufficiently for the content on your website. I know you set a lot of time and energy into them and truly hope you know how deeply I enjoy it. I hope I’ll do precisely the same for another man or woman at some time.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>