Dynamic CRM 2013 Learning Notes (43) Process 6-Customizing process activities

Source: Internet
Author: User

When we add steps in the process, there are some default steps, like Create, update, email, etc, but what if you want to add a step that doesn't exist, such as sending an SMS message, or calling an external Web service? Then you can only customize a process activity. Here is a detailed description of how to create a custom process activity.

1. Open vs2012 and create a new project:

Two dll:Microsoft.Xrm.Sdk that need to refer to CRM; Microsoft.Xrm.Sdk.Workflow;

2. Delete the default Activity1. XAML, create a new class:

Using
using System.activities;
Using
Using
Namespace
     Public class
    
        [Input ("My Contact"
        [Referencetarget ("Contact"
        [Default ("{575a8b41-f8d7-4dce-b2ea-3ffde936ab1b}""Contact")]         
        Public
        
        protected Override void
        {  
            
            
            
            
            New
            
            New
            "Call the new contact"
            New
            
            Tracingservice.trace ("PhoneCall created.");
        }
    }
}

Note that the code here uses LINQ, to use LINQ in CRM, to make a class with the following method, and to refer to the project:

crmsvcutil.exe/url:http://Localhost/organization1/xrmservices/2011/organization.svc/out:generatedcode.cs

Crmsvcutil.exe under Sdk/bin, this generated class includes all entity classes and supports LINQ.

3. The generated DLL, like a plug-in registration, after registration, you can find it in the Add process step:

4. Select the custom step and click the Set Properties button

Note that if you modify the project, after you recompile, you need to restart the Windows Services Microsoft CRM Asynchronous processing service. Sometimes you may also want to restart IIS when you republish the modified DLL. Of course real-time workflows do not need to open the Windows Service Microsoft CRM Asynchronous processing service.

A total of 6 processes were written before and after, explaining how to use the process in CRM 2013. Business people now have the flexibility to implement the specified business logic. A dialog (Dialog) is a process that is synchronous and can be interactive; a workflow can be either synchronous or asynchronous; an action can be thought of as a real-time workflow. Previous developers need to add a button and entity field (Flag) to trigger the plug-in to implement the function, now you can consider the operation, but also a good way to move the logic of JavaScript into the plug-in to protect the IP.

Dynamic CRM 2013 Learning Notes Series Rollup

Dynamic CRM 2013 Learning Notes (43) Process 6-Customizing process activities

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.