locked
Task assignment - Plugin for Route Message RRS feed

  • Question

  • Hi there I am writing a plugin that intercept the pre assignment of task.

    The plugin should do the following:

    on Pre Assign, check the RouteType. If RouteType = Queue, then return without error.
    If RouteType = user, then
    check if the task assign to own (caller), return without error.

    else, means assign to others, prompt error.

    as a conclusion, i wan to prevent user assign taks to other users but it is allowed to assign task to own and queue.


    I can get the current user Guid from context.userid but may I know how to get the target assigned user Guid?
    Monday, November 23, 2009 5:27 AM

Answers

  • Please cancel it. Wrong category. I have posted again to CRM Development.
    Monday, November 23, 2009 5:53 AM
  • Hi

    Hope this helps.

    if (context.InputParameters.Properties["RouteType"] == RouteType.Queue)
    {
      Guid RouteQueueid=  (Guid)context.InputParameters["EndpointId"];
    }
    else
    {
      Guid RouteUserid=  (Guid)context.InputParameters["EndpointId"];
    }


    Regards
    Vinoth

    Tuesday, November 24, 2009 2:10 PM

All replies

  • Please cancel it. Wrong category. I have posted again to CRM Development.
    Monday, November 23, 2009 5:53 AM
  • Hi

    Hope this helps.

    if (context.InputParameters.Properties["RouteType"] == RouteType.Queue)
    {
      Guid RouteQueueid=  (Guid)context.InputParameters["EndpointId"];
    }
    else
    {
      Guid RouteUserid=  (Guid)context.InputParameters["EndpointId"];
    }


    Regards
    Vinoth

    Tuesday, November 24, 2009 2:10 PM