locked
How to update multiple records in same entity using workflow/ code in crm2011 RRS feed

  • Question

  • Hi ,

    i have a status filed in my entity and i have lookup to select agent.

    This entity is used to assign agent to project.

    when i change the status of  agent to "notinuse" for one project, i want entire records of that agent to be updated as notinuse.

    how can i do this?

    Thursday, September 4, 2014 11:43 AM

All replies

  • hi,

    there is a distribute workflow - custom activity step that would help you do this.

    it just executes a child workflow based on relationship provided.

    http://crm2011distributewf.codeplex.com/

    regards,

    Jithesh

    Thursday, September 4, 2014 12:15 PM
  • Thanks Jithesh,

    I tried that but it work for parent child relationship entity.

    But i have to update the same entity

    Thursday, September 4, 2014 12:39 PM
  • For this, you will have to write your own custom workflow activity.

    or when the status changes, you could use a plugin to get all entities of same agent and update it.

    you could also do this from JavaScript.

    regards

    Jithesh

    Thursday, September 4, 2014 1:01 PM
  • You can make a plugin that runs (Update Context-You need to save the record) when that field is changed.

    You need to retrieve all records related to your target agent and then modify the status.

    Thursday, September 4, 2014 4:33 PM