web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • Joshua Wright Profile Picture
    410 on at
    RE: Custom Workflow Activity

    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.

  • Muhammad Adeel Javaid Profile Picture
    5,580 on at
    RE: Custom Workflow Activity

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

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

  • Muhammad Adeel Javaid Profile Picture
    5,580 on at
    RE: Custom Workflow Activity

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

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

  • Verified answer
    jlattimer Profile Picture
    24,562 on at
    RE: Custom Workflow Activity

    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); 
    } 
  • Joshua Wright Profile Picture
    410 on at
    RE: Custom Workflow Activity

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

  • Muhammad Adeel Javaid Profile Picture
    5,580 on at
    RE: Custom Workflow Activity

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

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans