AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 26.04.2011, 20:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,491 / 846 (79) +++++++
Регистрация: 28.10.2006
Microsoft Dynamics CRM Team Blog: SilverCrmSoap: A CRM Soap Library for CRM 2011
Источник: http://blogs.msdn.com/b/crm/archive/...-crm-2011.aspx
==============

SilverCrmSoap is a library built using the methods in Walkthrough: Use the SOAP Endpoint for Web Resources with Silverlight. The SilverCrmSoap library simplifies SOAP Silverlight development for CRM 2011 by providing a class that does a lot of the heavy lifting right out of the box.

Why use SilverCrmSoap?

If you are using the SOAP End Point, then the library will help simplify your project by removing the complexities of connecting to the SOAP End Point in Silverlight while providing additional tools to assist with your Silverlight project.  In the end, it really boils down to where do you use SOAP instead of REST?  You use SOAP when:

  • You need to use late binding to create a dynamic Silverlight application that works with any (or multiple) entities.
  • You need to execute a message.
  • You need to assign records.
  • You need to retrieve metadata.
There are benefits to using the REST endpoint too, and being able to quickly leverage both end points in a project can be extremely helpful.  You should use the REST End Point when:

  • You need to early bind to objects.
  • You want to leverage LINQ with the early bound objects.
  • You want compile time type support and IntelliSense.
You can find more information on the SOAP and REST End Points in the MSDN Article: Use Web Service Data in Web Resources (REST and SOAP Endpoint).

Using SilverCrmSoap

The SilverCrmSoap library is built to be added as a compiled DLL reference in a Silverlight projects.  It facilitates making calls to CRM when used in a Silverlight Web-Resource. 

Inside your Silverlight application solution in Visual Studio, add a reference to the compiled SilverCrmSoap.dll



Once referenced, there are three namespaces that assist with Silverlight development for CRM:

  • SilverCrmSoap.CrmSdk
  • SilverCrmSoap.FetchXml
  • SilverCrmSoap.Helpers
SilverCrmSoap.CrmSdk

Built following the steps in Walkthrough: Use the SOAP Endpoint for Web Resources with Silverlight, this namespace provides access to the SOAP Endpoint.  The SilverCrmSoap.CrmSdk also contains some examples for extending the base Entity class.  In the SilverCrmSoap project a UserOwnedEntitiy class has been added that extends the Entity class and raises the appropriate event when a field is changed.  By default the SOAP Entity object only raises a property changed event if the Attributes object itself is changed.  In addition to the UserOwnedEntity class which specifies the default fields for user owned entities, an Annotation class has been added that inherits from the UserOwnedEntity, adding the specific fields for notes.  This type of extension becomes important when you are attempting to facilitate data-binding.

SilverCrmSoap.FetchXml

The FetchXml namespace provides a set of classes built according to the FetchXml schema to allow deserialization of FetchXml to support the modifying parameters through code, i.e. objectifying FetchXml.  You will want to do this because a query expression does not return column values from another entity, and yet the reason why QueryExpressions are used so widely is because of their ability to easily be modified through code.  By de-serializing the FetchXml query string, you will be able to edit it’s values using objects, then serialize it to use in your queries

SilverCrmSoap.Helpers

The SilverCrmSoap Library contains 3 helpers, the Xrmhelper, the FormHelper, and the SoapHelper.



XrmHelper

The XrmHelper provides on-demand access to the JScript objects that are commonly used such as the Xrm.Page, context, etc.  It is also able to determine if the control was loaded as a web-resource on a form or if it was loaded outside a form.  When using this helper, it is important to either put the web-resource on the form or put it on an html page that provides access to the GlobalContext.

FormHelper

FormHelper takes the XrmHelper and provides a couple of additional quick access methods that utilize the JScript objects XrmHelper provides:

  • GetUserPrivilege: Get the privileges for an attribute and determines if the user can read, update, or create.
  • GetEntityValue: Gets a value from the form using the Xrm.Page.data.entity.attributes JScript Object.
  • SetEntityValue: Sets a value from the form using the Xrm.Page.data.entity.attributes JScript Object.
SoapHelper

The SoapHelper was built to leverage the walkthrough for interfacing the SOAP End Point and provide a set of methods to launch the proper asynchronous call, simplifying access.  One of the great things about these helpers is that you don’t need to specify the URL to use them.  They leverage the context to correctly set the service URL.  The SoapHelper provides a way to quickly connect to the SOAP End Point and a set of methods to jumpstart the begin statements of asynchronous SOAP calls:

  • BeginAssociate
  • BeginCreate
  • BeginUpdate
  • BeginDelete
  • BeginDisassociate
  • BeginExecute
  • BeginExecuteFetch
  • BeginExecuteRetrieveAllEntities
  • BeginExecuteRetrieveEntity
Cheers,

Carlton Colter







Источник: http://blogs.msdn.com/b/crm/archive/...-crm-2011.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
CRM DE LA CREME! CRM 4.0 Disaster Recovery Blog bot Dynamics CRM: Blogs 2 26.02.2016 08:23
Microsoft Dynamics CRM Team Blog: Get Social with Vibe and Microsoft Dynamics CRM 2011 (free Community Edition) Blog bot Dynamics CRM: Blogs 0 04.02.2011 00:11
Microsoft Dynamics CRM Team Blog: Microsoft Dynamics CRM 2011 ~ Launch Time Blog bot Dynamics CRM: Blogs 0 12.01.2011 03:18
Все о Microsoft Dynamics CRM: Как установить Microsoft Dynamics CRM 2011 Beta Blog bot Dynamics CRM: Blogs 0 31.10.2010 15:08
Microsoft Dynamics CRM Team Blog: Microsoft Dynamics CRM 4.0 Bookshelf Blog bot Dynamics CRM: Blogs 1 22.01.2009 04:46

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 17:17.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.