web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Custom Workflow Activity

(0) ShareShare
ReportReport
Posted on by 410

I just created my first Custom Workflow Activity and have it working as desired.  My question is how do I either:

A) restrict that activity to only be available from one entity (custom)

or

B) determine which entity is calling the activty so I can break if it is called from an incorrect entity.

I have read through all of the sdk documentation and searched multiple blogs/forums with no luck.

*This post is locked for comments

I have the same question (0)
  • Muhammad Adeel Javaid Profile Picture
    5,580 on at

    To learn about Workflow rules you can refer to this link please:

    login.salesforce.com/.../workflow_examples.htm

  • Joshua Wright Profile Picture
    410 on at

    The linked article is specific to salesforce and does not give any relevant information to Custom Workflow Assembalies is CRM 2011.

  • Verified answer
    jlattimer Profile Picture
    24,564 on at

    I don't believe there is a way to limit the custom activity to a certain entity through the UI but you could do a check in the code itself.

    You could use something like this to abort processing in the event an incorrect entity was used:

    IWorkflowContext context = executionContext.GetExtension(); 
    string entityname = context.PrimaryEntityName; 
    //Check for correct type... 
    if (entityname != "email") 
     throw new InvalidPluginExecutionException("Action not allowed on entity type of " + entityname); 
    } 
  • Muhammad Adeel Javaid Profile Picture
    5,580 on at

    Dear Joshua for Custom Workflow Assemblies for MSCRM 2011 here is a suggested link:

    technet.microsoft.com/.../gg309745.aspx

  • Muhammad Adeel Javaid Profile Picture
    5,580 on at

    Here is a link to an article to register and Use a Custom Workflow Activity Assembly in MSCRM 2011:

    msdn.microsoft.com/.../gg328153.aspx

  • Joshua Wright Profile Picture
    410 on at

    This is what I was afraid of.  I was hoping I was missing somewhere in the methods metadata this could be set.  Thanks for the reply.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans