C# Class Xrm.Sdk.OrganizationServiceProxy

The OrganizationServiceProxy is a static class for ease of use We might need to make an instance class as well to aid sharing code between client and server
显示文件 Open project: scottdurow/SparkleXrm Class Usage Examples

Public Properties

Property Type Description
ExecuteMessageResponseTypes Type>.Dictionary
OrganizationSettings Xrm.Sdk.OrganizationSettings
UserSettings Xrm.Sdk.UserSettings
WithCredentials bool

Public Methods

Method Description
Associate ( string entityName, Guid entityId, Xrm.Sdk.Relationship relationship, List relatedEntities ) : void

Associate one or more related entites to a target entity.

BeginAssociate ( string entityName, Guid entityId, Xrm.Sdk.Relationship relationship, List relatedEntities, Action callBack ) : void
BeginCreate ( Entity entity, Action callBack ) : void
BeginDelete ( string entityName, Guid id, Action callBack ) : void
BeginDisassociate ( string entityName, Guid entityId, Xrm.Sdk.Relationship relationship, List relatedEntities, Action callBack ) : void
BeginExecute ( OrganizationRequest request, Action callBack ) : void
BeginRetrieve ( string entityName, string entityId, string attributesList, Action callBack ) : void
BeginRetrieveMultiple ( string fetchXml, Action callBack ) : void
BeginSetState ( Guid id, string entityName, int stateCode, int statusCode, Action callBack ) : void
BeginUpdate ( Entity entity, Action callBack ) : void
Create ( Entity entity ) : Guid

Creates a new entity record using the supplied Entity object

Delete_ ( string entityName, Guid id ) : string
Disassociate ( string entityName, Guid entityId, Xrm.Sdk.Relationship relationship, List relatedEntities ) : void
DoesNNAssociationExist ( Xrm.Sdk.Relationship relationship, Xrm.Sdk.EntityReference Entity1, Xrm.Sdk.EntityReference Entity2 ) : bool

Checks for an existing N:N relationship between two records by executing a fetch against the relationship association table.

EndAssociate ( object asyncState ) : void
EndCreate ( object asyncState ) : Guid
EndDelete ( object asyncState ) : void
EndDisassociate ( object asyncState ) : void
EndExecute ( object asyncState ) : OrganizationResponse
EndRetrieve ( object asyncState, Type entityType ) : Entity
EndRetrieveMultiple ( object asyncState, Type entityType ) : Xrm.Sdk.EntityCollection
EndSetState ( object asyncState ) : void
EndUpdate ( object asyncState ) : void
Execute ( OrganizationRequest request ) : OrganizationResponse
GetUserSettings ( ) : Xrm.Sdk.UserSettings
RegisterExecuteMessageResponseType ( string responseTypeName, Type organizationResponseType ) : void
Retrieve ( string entityName, string entityId, string attributesList ) : Entity
RetrieveMultiple ( string fetchXml ) : Xrm.Sdk.EntityCollection
SetState ( Guid id, string entityName, int stateCode, int statusCode ) : void
Update ( Entity entity ) : void

Private Methods

Method Description
GetAssociateRequest ( string entityName, Guid entityId, Xrm.Sdk.Relationship relationship, List relatedEntities ) : string
GetCreateRequest ( Entity entity ) : string
GetDeleteRequest ( string entityName, Guid id ) : string
GetDisassociateRequest ( string entityName, Guid entityId, Xrm.Sdk.Relationship relationship, List relatedEntities ) : string
GetEntityCollectionResults ( XmlDocument resultXml, Type entityType ) : Xrm.Sdk.EntityCollection
GetExecuteRequest ( OrganizationRequest request ) : string
GetResponse ( string soapXmlPacket, string action, Action asyncCallback ) : XmlDocument
GetRetrieveMultipleRequest ( string fetchXml ) : string
GetRetrieveRequest ( string entityName, string entityId, string attributesList ) : string
GetServerUrl ( ) : string
GetSetStateRequest ( Guid id, string entityName, int stateCode, int statusCode ) : string
GetSoapFault ( XmlDocument response ) : Exception
getSoapEnvelope ( string payLoadXml ) : string

Gets the SOAP Xml to send to the server

Method Details

Associate() public static method

Associate one or more related entites to a target entity.
public static Associate ( string entityName, Guid entityId, Xrm.Sdk.Relationship relationship, List relatedEntities ) : void
entityName string The Logical Name of the target entity.
entityId Guid The GUID that uniquely defines the target entity.
relationship Xrm.Sdk.Relationship The Relationship to use for the association.
relatedEntities List A list of related EntityReference records to associate to the target.
return void

BeginAssociate() public static method

public static BeginAssociate ( string entityName, Guid entityId, Xrm.Sdk.Relationship relationship, List relatedEntities, Action callBack ) : void
entityName string
entityId Guid
relationship Xrm.Sdk.Relationship
relatedEntities List
callBack Action
return void

BeginCreate() public static method

public static BeginCreate ( Entity entity, Action callBack ) : void
entity Entity
callBack Action
return void

BeginDelete() public static method

public static BeginDelete ( string entityName, Guid id, Action callBack ) : void
entityName string
id Guid
callBack Action
return void

BeginDisassociate() public static method

public static BeginDisassociate ( string entityName, Guid entityId, Xrm.Sdk.Relationship relationship, List relatedEntities, Action callBack ) : void
entityName string
entityId Guid
relationship Xrm.Sdk.Relationship
relatedEntities List
callBack Action
return void

BeginExecute() public static method

public static BeginExecute ( OrganizationRequest request, Action callBack ) : void
request OrganizationRequest
callBack Action
return void

BeginRetrieve() public static method

public static BeginRetrieve ( string entityName, string entityId, string attributesList, Action callBack ) : void
entityName string
entityId string
attributesList string
callBack Action
return void

BeginRetrieveMultiple() public static method

public static BeginRetrieveMultiple ( string fetchXml, Action callBack ) : void
fetchXml string
callBack Action
return void

BeginSetState() public static method

public static BeginSetState ( Guid id, string entityName, int stateCode, int statusCode, Action callBack ) : void
id Guid
entityName string
stateCode int
statusCode int
callBack Action
return void

BeginUpdate() public static method

public static BeginUpdate ( Entity entity, Action callBack ) : void
entity Entity
callBack Action
return void

Create() public static method

Creates a new entity record using the supplied Entity object
public static Create ( Entity entity ) : Guid
entity Entity
return Guid

Delete_() public static method

public static Delete_ ( string entityName, Guid id ) : string
entityName string
id Guid
return string

Disassociate() public static method

public static Disassociate ( string entityName, Guid entityId, Xrm.Sdk.Relationship relationship, List relatedEntities ) : void
entityName string
entityId Guid
relationship Xrm.Sdk.Relationship
relatedEntities List
return void

DoesNNAssociationExist() public static method

Checks for an existing N:N relationship between two records by executing a fetch against the relationship association table.
public static DoesNNAssociationExist ( Xrm.Sdk.Relationship relationship, Xrm.Sdk.EntityReference Entity1, Xrm.Sdk.EntityReference Entity2 ) : bool
relationship Xrm.Sdk.Relationship The Relationship to evaluate.
Entity1 Xrm.Sdk.EntityReference EntityReference for the one of the entities to test.
Entity2 Xrm.Sdk.EntityReference EntityReference for the second entity to test.
return bool

EndAssociate() public static method

public static EndAssociate ( object asyncState ) : void
asyncState object
return void

EndCreate() public static method

public static EndCreate ( object asyncState ) : Guid
asyncState object
return Guid

EndDelete() public static method

public static EndDelete ( object asyncState ) : void
asyncState object
return void

EndDisassociate() public static method

public static EndDisassociate ( object asyncState ) : void
asyncState object
return void

EndExecute() public static method

public static EndExecute ( object asyncState ) : OrganizationResponse
asyncState object
return OrganizationResponse

EndRetrieve() public static method

public static EndRetrieve ( object asyncState, Type entityType ) : Entity
asyncState object
entityType System.Type
return Entity

EndRetrieveMultiple() public static method

public static EndRetrieveMultiple ( object asyncState, Type entityType ) : Xrm.Sdk.EntityCollection
asyncState object
entityType System.Type
return Xrm.Sdk.EntityCollection

EndSetState() public static method

public static EndSetState ( object asyncState ) : void
asyncState object
return void

EndUpdate() public static method

public static EndUpdate ( object asyncState ) : void
asyncState object
return void

Execute() public static method

public static Execute ( OrganizationRequest request ) : OrganizationResponse
request OrganizationRequest
return OrganizationResponse

GetUserSettings() public static method

public static GetUserSettings ( ) : Xrm.Sdk.UserSettings
return Xrm.Sdk.UserSettings

RegisterExecuteMessageResponseType() public static method

public static RegisterExecuteMessageResponseType ( string responseTypeName, Type organizationResponseType ) : void
responseTypeName string
organizationResponseType System.Type
return void

Retrieve() public static method

public static Retrieve ( string entityName, string entityId, string attributesList ) : Entity
entityName string
entityId string
attributesList string
return Entity

RetrieveMultiple() public static method

public static RetrieveMultiple ( string fetchXml ) : Xrm.Sdk.EntityCollection
fetchXml string
return Xrm.Sdk.EntityCollection

SetState() public static method

public static SetState ( Guid id, string entityName, int stateCode, int statusCode ) : void
id Guid
entityName string
stateCode int
statusCode int
return void

Update() public static method

public static Update ( Entity entity ) : void
entity Entity
return void

Property Details

ExecuteMessageResponseTypes public_oe static_oe property

public static Dictionary ExecuteMessageResponseTypes
return Type>.Dictionary

OrganizationSettings public_oe static_oe property

public static OrganizationSettings,Xrm.Sdk OrganizationSettings
return Xrm.Sdk.OrganizationSettings

UserSettings public_oe static_oe property

public static UserSettings,Xrm.Sdk UserSettings
return Xrm.Sdk.UserSettings

WithCredentials public_oe static_oe property

public static bool WithCredentials
return bool