@Connector(name="dynamicscrm", schemaVersion="2.0", friendlyName="Microsoft Dynamics CRM", minMuleVersion="3.8.0") @MetaDataScope(value=EntitiesMetadataScope.class) @ReconnectOn(exceptions=javax.xml.ws.soap.SOAPFaultException.class) @RequiresEnterpriseLicense(allowEval=true) public class DynamicsCRMConnector extends Object implements org.mule.api.context.MuleContextAware
Modifier and Type | Field and Description |
---|---|
static String |
REQUEST_NAME |
Constructor and Description |
---|
DynamicsCRMConnector() |
Modifier and Type | Method and Description |
---|---|
void |
associate(String logicalName,
String id,
boolean relationshipEntityRoleIsReferenced,
String relationshipSchemaName,
List<String> relatedEntitiesIds)
Create links between records.
|
String |
create(String logicalName,
Map<String,Object> attributes)
Create a new record.
|
org.mule.common.bulk.BulkOperationResult<Map<String,Object>> |
createMultiple(String logicalName,
List<Map<String,Object>> attributesList,
boolean useSingleTransaction)
Create a several new record.
|
void |
delete(String logicalName,
String id)
Delete a record.
|
org.mule.common.bulk.BulkOperationResult<String> |
deleteMultiple(String logicalName,
List<String> ids,
boolean useSingleTransaction)
Delete multiple records.
|
void |
disassociate(String logicalName,
String id,
boolean relationshipEntityRoleIsReferenced,
String relationshipSchemaName,
List<String> relatedEntitiesIds)
Delete a link between records.
|
Object |
execute(String requestName,
Object requestParameters,
String requestId)
Executes a message in the form of a request, and returns a response.
|
org.mule.common.bulk.BulkOperationResult<OrganizationResponse> |
executeMultiple(List<Object> requests,
String requestId,
boolean useSingleTransaction)
Executes multiple messages in the form of a request, and returns their respective responses.
|
AttributesBaseRetriever |
getAttributesRetriever(AttributesFactoryScope scope) |
BaseCrmConnectionStrategy |
getConnectionStrategy() |
EntitiesRetriever |
getEntitiesRetriever() |
RelationshipsRetriever |
getRelationshipsRetriever() |
Map<String,Object> |
retrieve(String logicalName,
String id)
Retrieve a record.
|
org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,DynamicsCRMConnector> |
retrieveMultipleByQuery(String query,
org.mule.streaming.PagingConfiguration pagingConfiguration,
int singlePageNumber)
Retrieve multiple records.
|
void |
setConnectionStrategy(BaseCrmConnectionStrategy connectionStrategy) |
void |
setMuleContext(org.mule.api.MuleContext context) |
String |
translateQueryDsqlToNative(org.mule.common.query.DsqlQuery dsqlQuery)
Method that handles the request to transform a query from DSQL to the
Native Query Language.
|
void |
update(String logicalName,
String id,
Map<String,Object> attributes)
Update a record's attributes.
|
org.mule.common.bulk.BulkOperationResult<Map<String,Object>> |
updateMultiple(String logicalName,
List<Map<String,Object>> attributesList,
boolean useSingleTransaction)
Update a record's attributes.
|
public static final String REQUEST_NAME
@QueryTranslator public String translateQueryDsqlToNative(org.mule.common.query.DsqlQuery dsqlQuery)
dsqlQuery
- the DSQL query object with the query to be translated into
native format.@Processor public String create(@MetaDataKeyParam(affects=INPUT) String logicalName, @Default(value="#[payload]") @Placement(group="Attributes") Map<String,Object> attributes) throws IOrganizationServiceCreateOrganizationServiceFaultFaultFaultMessage
logicalName
- The logical name of the entity.attributes
- The attributes of the record as a MapIOrganizationServiceCreateOrganizationServiceFaultFaultFaultMessage
- If create fails.
@Processor public org.mule.common.bulk.BulkOperationResult<Map<String,Object>> createMultiple(@MetaDataKeyParam(affects=INPUT) @FriendlyName(value="Entity") String logicalName, @Default(value="#[payload]") @Placement(group="Attributes") List<Map<String,Object>> attributesList, @Default(value="false") boolean useSingleTransaction) throws IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage
logicalName
- The logical name of the entity.attributesList
- The list of attributes of the record as a ListuseSingleTransaction
- If supported (CRM 2016 and above) use a single transaction to create all items, if anyone fails then rollback all.IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage
- If execute fails.
@Processor public void update(@MetaDataKeyParam(affects=INPUT) String logicalName, String id, @Default(value="#[payload]") @Placement(group="Attributes") Map<String,Object> attributes) throws IOrganizationServiceUpdateOrganizationServiceFaultFaultFaultMessage
logicalName
- The logical name of the entity.id
- The id of the record to update.attributes
- The attributes to be updated as a MapIOrganizationServiceUpdateOrganizationServiceFaultFaultFaultMessage
- If update fails.
@Processor public org.mule.common.bulk.BulkOperationResult<Map<String,Object>> updateMultiple(@MetaDataKeyParam(affects=INPUT) String logicalName, @Default(value="#[payload]") @Placement(group="Attributes") List<Map<String,Object>> attributesList, @Default(value="false") boolean useSingleTransaction) throws IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage
logicalName
- The logical name of the entity.attributesList
- The list of attributes of the record as a ListuseSingleTransaction
- If supported (CRM 2016 and above) use a single transaction to update all items, if anyone fails then rollback all.IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage
- If update fails.
@Processor @MetaDataScope(value=DeleteMetadataScope.class) public void delete(@MetaDataKeyParam(affects=INPUT) String logicalName, @Default(value="#[payload]") String id) throws IOrganizationServiceDeleteOrganizationServiceFaultFaultFaultMessage
logicalName
- The logical name of the entity.id
- The id of the record to delete.IOrganizationServiceDeleteOrganizationServiceFaultFaultFaultMessage
- If delete fails.
@Processor @MetaDataScope(value=DeleteMetadataScope.class) public org.mule.common.bulk.BulkOperationResult<String> deleteMultiple(@MetaDataKeyParam(affects=INPUT) String logicalName, @Default(value="#[payload]") List<String> ids, @Default(value="false") boolean useSingleTransaction) throws IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage
logicalName
- The logical name of the entity.ids
- The ids of the records to delete.useSingleTransaction
- If supported (CRM 2016 and above) use a single transaction to delete all items, if anyone fails then rollback all.IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage
- If delete fails.
@Processor public Map<String,Object> retrieve(@MetaDataKeyParam(affects=OUTPUT) String logicalName, @Default(value="#[payload]") String id) throws IOrganizationServiceRetrieveOrganizationServiceFaultFaultFaultMessage
logicalName
- The logical name of the entity.id
- The id of the record to retrieve.IOrganizationServiceRetrieveOrganizationServiceFaultFaultFaultMessage
- If retrieve fails
@Processor @Paged public org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,DynamicsCRMConnector> retrieveMultipleByQuery(@Query(offset=false,limit=false) String query, org.mule.streaming.PagingConfiguration pagingConfiguration, @Placement(group="One Page Only") @FriendlyName(value="Single Page Number") @Default(value="-1") int singlePageNumber) throws IOrganizationServiceRetrieveMultipleOrganizationServiceFaultFaultFaultMessage
query
- For DataSense Query Language, the DSQL query. For Native Query
Language, the Fetch XML query.pagingConfiguration
- The configuration for the pagination feature.singlePageNumber
- If greater than 0, returns only that specific page.IOrganizationServiceRetrieveMultipleOrganizationServiceFaultFaultFaultMessage
- If retrieveMultiple fails.
@Processor @MetaDataScope(value=AssociateAndDisassociateMetadataScope.class) public void associate(@MetaDataKeyParam(affects=INPUT) String logicalName, String id, @Default(value="false") boolean relationshipEntityRoleIsReferenced, String relationshipSchemaName, @Default(value="#[payload]") @Placement(group="Related entities attributes") List<String> relatedEntitiesIds) throws IOrganizationServiceAssociateOrganizationServiceFaultFaultFaultMessage
logicalName
- The logical name of the entity.id
- The id of the record to which the related records are
associated.relationshipEntityRoleIsReferenced
- false: when the primary
entity record is Referencing the record to associate; true: when
the primary entity record is Referenced by the record to
associate.relationshipSchemaName
- The name of the relationship to create the link.relatedEntitiesIds
- A ListIOrganizationServiceAssociateOrganizationServiceFaultFaultFaultMessage
- If associate fails.
@Processor @MetaDataScope(value=AssociateAndDisassociateMetadataScope.class) public void disassociate(@MetaDataKeyParam(affects=INPUT) String logicalName, String id, @Default(value="false") boolean relationshipEntityRoleIsReferenced, String relationshipSchemaName, @Default(value="#[payload]") @Placement(group="Related entities attributes") List<String> relatedEntitiesIds) throws IOrganizationServiceDisassociateOrganizationServiceFaultFaultFaultMessage
logicalName
- The logical name of entity.id
- The id of the record from which the related records are
disassociated.relationshipEntityRoleIsReferenced
- false: when the primary entity record is Referencing the
record to associate; true: when the primary entity record is
Referenced by the record to associate.relationshipSchemaName
- The name of the relationship to delete the link.relatedEntitiesIds
- A ListIOrganizationServiceDisassociateOrganizationServiceFaultFaultFaultMessage
- If disassociate fails.
@Processor @MetaDataScope(value=ExecuteMetadataScope.class) public Object execute(@Placement(group="General",order=1) @MetaDataKeyParam(affects=BOTH) String requestName, @Payload Object requestParameters, @Placement(group="General",order=2) @Optional String requestId) throws IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage
requestName
- The logical name of request make.requestParameters
- [DEPRECATED] This parameter will be removed from the configuration in the near future. Set the #[payload] correctly before calling the connector.requestId
- The id of the request to make.IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage
- If execute fails.
@Processor public org.mule.common.bulk.BulkOperationResult<OrganizationResponse> executeMultiple(@Payload List<Object> requests, @Placement(group="General",order=2) @Optional String requestId, @Default(value="false") boolean useSingleTransaction) throws IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage
requests
- This parameter is a list of the requests (OrganizationRequest or Map). Set the #[payload] correctly before calling the connector.requestId
- The id of the request to make.useSingleTransaction
- If supported (CRM 2016 and above) use a single transaction to execute all requests, if anyone fails then rollback all.IOrganizationServiceExecuteOrganizationServiceFaultFaultFaultMessage
- If execute fails.public BaseCrmConnectionStrategy getConnectionStrategy()
public void setConnectionStrategy(BaseCrmConnectionStrategy connectionStrategy)
public EntitiesRetriever getEntitiesRetriever()
public RelationshipsRetriever getRelationshipsRetriever()
public AttributesBaseRetriever getAttributesRetriever(AttributesFactoryScope scope)
public void setMuleContext(org.mule.api.MuleContext context)
setMuleContext
in interface org.mule.api.context.MuleContextAware
Copyright © 2010–2019. All rights reserved.