C# Class xrmtb.XrmToolBox.Controls.CrmActions

Various helper methods for working with CRM queries, objects, etc.
Show file Open project: jamesnovak/xrmtb.XrmToolBox.Controls

Public Methods

Method Description
CreateEntityKey ( IOrganizationService service, string entityLogicalName, string logicalName, string keyDisplayName, List keyAttributes ) : string

DeleteEntityKey ( IOrganizationService service, EntityKeyMetadata key ) : void

Delete a selected Entity Alternate Key

DeleteEntityKey ( IOrganizationService service, List keys ) : void

Delete a list of Alternate Keys

GetLocalizedLabel ( Label label, string valueIfNull, int languagCode = 1033 ) : string

Helper method to get the first label in the list of LocalizedLabels

ReactivateEntityKey ( IOrganizationService service, EntityKeyMetadata key ) : List

Reactivate an Entity Key

ReactivateEntityKey ( IOrganizationService service, List keys ) : List

Reactivate a batch of Entity Alternate Keys

RetrieveAllEntities ( IOrganizationService service, xrmtb.XrmToolBox.Controls.ConfigurationInfo config ) : List

Rerieve all entities with the given filter conditions

RetrieveAllEntities ( IOrganizationService service, List entityFilters = null, bool retrieveAsIfPublished = true ) : List

Rerieve all entities with the given filter conditions

RetrieveEntitiesForSolution ( IOrganizationService service, string solutionName, bool retrieveAsIfPublished = true ) : List

https://simonetagliaro.wordpress.com/2012/10/02/retrieve-all-the-entities-within-a-solution-crm-2011/

RetrieveEntity ( IOrganizationService service, string entityLogicalName, bool retrieveAsIfPublished ) : EntityMetadata

Retrieve an Entity Metadata and include the default entity Entity details

RetrieveEntity ( IOrganizationService service, string entityLogicalName, bool retrieveAsIfPublished, EntityFilters entityFilter ) : EntityMetadata

Retrieve the Entity Metadata and include the details as provided by the entityFilter argument

RetrieveEntity ( IOrganizationService service, string entityLogicalName, bool retrieveAsIfPublished, List entityFilters ) : EntityMetadata

Retrieve an Entity Metadata and include Entity details as specified in the EntityFilters provided

RetrieveEntity ( IOrganizationService service, List entityLogcialNames, bool retrieveAsIfPublished = true, List entityFilters = null ) : List

Retrieve entities in a list of Entity logical names

RetrieveEntityAttributes ( IOrganizationService service, string entityLogicalName ) : List

Retrieve all attributes for an Entity

RetrieveEntityAttributes ( IOrganizationService service, string entityLogicalName, bool retrieveAsIfPublished ) : List

Retrieve all attributes for an Entity

RetrieveEntityKey ( IOrganizationService service, ConfigurationInfo config, EntityMetadata entity, bool retrieveAsIfPublished ) : EntityKeyMetadata

Retrieve an Entity Key Metadata record

RetrieveEntityViews ( IOrganizationService service, int objectTypeCode, bool includePersonal ) : List

Helper method for retrieving system and user saved queries for an entity

RetrieveGlobalOptionSets ( IOrganizationService service, bool retrieveAsIfPublished = true, string solutionName = null ) : List
RetrievePublishers ( IOrganizationService service ) : List

Rtrieve a list of Publishers with some common attributes

RetrieveSolutions ( IOrganizationService service, List publisherFilters = null ) : List

Retrieve a list of Solutions with some common attributes

Method Details

CreateEntityKey() public static method

public static CreateEntityKey ( IOrganizationService service, string entityLogicalName, string logicalName, string keyDisplayName, List keyAttributes ) : string
service IOrganizationService
entityLogicalName string
logicalName string
keyDisplayName string
keyAttributes List
return string

DeleteEntityKey() public static method

Delete a selected Entity Alternate Key
public static DeleteEntityKey ( IOrganizationService service, EntityKeyMetadata key ) : void
service IOrganizationService
key EntityKeyMetadata
return void

DeleteEntityKey() public static method

Delete a list of Alternate Keys
public static DeleteEntityKey ( IOrganizationService service, List keys ) : void
service IOrganizationService
keys List
return void

GetLocalizedLabel() public static method

Helper method to get the first label in the list of LocalizedLabels
public static GetLocalizedLabel ( Label label, string valueIfNull, int languagCode = 1033 ) : string
label Label Label object containing Localized Labels
valueIfNull string If the Localizd Labels are null, use this value instead
languagCode int
return string

ReactivateEntityKey() public static method

Reactivate an Entity Key
public static ReactivateEntityKey ( IOrganizationService service, EntityKeyMetadata key ) : List
service IOrganizationService
key EntityKeyMetadata
return List

ReactivateEntityKey() public static method

Reactivate a batch of Entity Alternate Keys
public static ReactivateEntityKey ( IOrganizationService service, List keys ) : List
service IOrganizationService
keys List
return List

RetrieveAllEntities() public static method

Rerieve all entities with the given filter conditions
public static RetrieveAllEntities ( IOrganizationService service, xrmtb.XrmToolBox.Controls.ConfigurationInfo config ) : List
service IOrganizationService
config xrmtb.XrmToolBox.Controls.ConfigurationInfo
return List

RetrieveAllEntities() public static method

Rerieve all entities with the given filter conditions
public static RetrieveAllEntities ( IOrganizationService service, List entityFilters = null, bool retrieveAsIfPublished = true ) : List
service IOrganizationService
entityFilters List
retrieveAsIfPublished bool
return List

RetrieveEntitiesForSolution() public static method

https://simonetagliaro.wordpress.com/2012/10/02/retrieve-all-the-entities-within-a-solution-crm-2011/
public static RetrieveEntitiesForSolution ( IOrganizationService service, string solutionName, bool retrieveAsIfPublished = true ) : List
service IOrganizationService
solutionName string
retrieveAsIfPublished bool
return List

RetrieveEntity() public static method

Retrieve an Entity Metadata and include the default entity Entity details
public static RetrieveEntity ( IOrganizationService service, string entityLogicalName, bool retrieveAsIfPublished ) : EntityMetadata
service IOrganizationService
entityLogicalName string
retrieveAsIfPublished bool
return EntityMetadata

RetrieveEntity() public static method

Retrieve the Entity Metadata and include the details as provided by the entityFilter argument
public static RetrieveEntity ( IOrganizationService service, string entityLogicalName, bool retrieveAsIfPublished, EntityFilters entityFilter ) : EntityMetadata
service IOrganizationService
entityLogicalName string
retrieveAsIfPublished bool
entityFilter EntityFilters
return EntityMetadata

RetrieveEntity() public static method

Retrieve an Entity Metadata and include Entity details as specified in the EntityFilters provided
public static RetrieveEntity ( IOrganizationService service, string entityLogicalName, bool retrieveAsIfPublished, List entityFilters ) : EntityMetadata
service IOrganizationService
entityLogicalName string
retrieveAsIfPublished bool
entityFilters List
return EntityMetadata

RetrieveEntity() public static method

Retrieve entities in a list of Entity logical names
public static RetrieveEntity ( IOrganizationService service, List entityLogcialNames, bool retrieveAsIfPublished = true, List entityFilters = null ) : List
service IOrganizationService
entityLogcialNames List
retrieveAsIfPublished bool
entityFilters List
return List

RetrieveEntityAttributes() public static method

Retrieve all attributes for an Entity
public static RetrieveEntityAttributes ( IOrganizationService service, string entityLogicalName ) : List
service IOrganizationService
entityLogicalName string
return List

RetrieveEntityAttributes() public static method

Retrieve all attributes for an Entity
public static RetrieveEntityAttributes ( IOrganizationService service, string entityLogicalName, bool retrieveAsIfPublished ) : List
service IOrganizationService
entityLogicalName string
retrieveAsIfPublished bool
return List

RetrieveEntityKey() public static method

Retrieve an Entity Key Metadata record
public static RetrieveEntityKey ( IOrganizationService service, ConfigurationInfo config, EntityMetadata entity, bool retrieveAsIfPublished ) : EntityKeyMetadata
service IOrganizationService
config ConfigurationInfo
entity EntityMetadata
retrieveAsIfPublished bool
return EntityKeyMetadata

RetrieveEntityViews() public static method

Helper method for retrieving system and user saved queries for an entity
public static RetrieveEntityViews ( IOrganizationService service, int objectTypeCode, bool includePersonal ) : List
service IOrganizationService
objectTypeCode int
includePersonal bool
return List

RetrieveGlobalOptionSets() public static method

public static RetrieveGlobalOptionSets ( IOrganizationService service, bool retrieveAsIfPublished = true, string solutionName = null ) : List
service IOrganizationService
retrieveAsIfPublished bool
solutionName string
return List

RetrievePublishers() public static method

Rtrieve a list of Publishers with some common attributes
public static RetrievePublishers ( IOrganizationService service ) : List
service IOrganizationService
return List

RetrieveSolutions() public static method

Retrieve a list of Solutions with some common attributes
public static RetrieveSolutions ( IOrganizationService service, List publisherFilters = null ) : List
service IOrganizationService
publisherFilters List
return List