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

Notifications

Announcements

No record found.

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,562 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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans