PublishDuplicateRule Message (CrmService)
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

PublishDuplicateRule Message (CrmService)

Dynamics
banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Works for all deployment typesWorks online only

Submits an asynchronous job to publish a duplicate rule.

The relevant classes are specified in the following table.

TypeClass
RequestPublishDuplicateRuleRequest
ResponsePublishDuplicateRuleResponse
Entityduplicaterule
Optional ParametersRequestIdOptionalParameter

Remarks

To use this message, pass an instance of the PublishDuplicateRuleRequest class as the request parameter in the Execute method.

To perform this action, the caller must have access rights on the duplicate rule entity instance. For a list of required privileges, see Publish Duplicate Rule Privileges.

Example

The following code example shows how to use the PublishDuplicateRule message.

[C#]
// Set up the CRM service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0; 
token.OrganizationName = "AdventureWorksCycle";
 
CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create a request to publish a duplicate rule.
PublishDuplicateRuleRequest request = new PublishDuplicateRuleRequest();
request.DuplicateRuleId = new Guid("1DCDEE97-35BB-44BE-8353-58BC36592656");

// Execute the request. The response contains the ID of the asynchronous publishing job that can be used to track the status of the publishing job.
PublishDuplicateRuleResponse response = (PublishDuplicateRuleResponse) service.Execute(request);
[Visual Basic .NET]
' Set up the CRM service.
Dim token As New CrmAuthenticationToken()
' You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0
token.OrganizationName = "AdventureWorksCycle";
 
Dim service As New CrmService()
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials

' Create a request.
Dim request As New PublishDuplicateRuleRequest()
request.DuplicateRuleId = New Guid("2B951FBC-1C56-4430-B23B-20A1349068F3");

' Execute the request.
Dim response As PublishDuplicateRuleResponse = CType(service.Execute(request), PublishDuplicateRuleResponse)

See Also

Concepts

Reference


© 2010 Microsoft Corporation. All rights reserved.


Show:
© 2016 Microsoft