locked
Plugin on Related Updates Intersect Entity RRS feed

  • Question

  • Hello,

    I am attempting to do the following and having a lot of trouble. The entities were already designed this way  and cannot be changed. I have 4 entities:

    Reservation N:1 Opportunity 1:N Opp Asset 1:N Asset

    Reservation rolls up to Opp. This is working fine. Opp Asset and Asset actually have fields that are all based on the values of the Reservation's total fields. We're just trying to get the Reservation rollup values to Opp Asset and Asset.

    When an Opp is updated, we'd like to update all Opp Assets(intersect) with the totals from the 1 Opp or the Reservation rollup (to bypass the plugin on Opp, if possible).

    When the Opp Asset is updated from the Opp (plugin 2), we want the Asset updated.

    Asset has the same fields as Opp. The values need to be passed from Opp to Asset based on the intersect relationship.

    If we could fore-go the plugin on the intersect (just used to hold opp values), that would be great.

    The only reason that the intersect was created was for viewing purposes that would not require coding.

    I've tried Fetch and Linq, but having issues. As of now I have 2 Fetch queries in a plugin on Opp Update. One for Opp with a link entity to Opp Asset to get the one Opp. Then another for Opp Asset with a link entity back to Opp.

    I am trying to update all the Opp Asset records with the totals from the one opp. Any help on this would be appreciated.

    Friday, January 23, 2015 3:40 PM

All replies

  • In nornal workflows you can update a parent record from child record where as your requirement is opposite. This will meet you requirement:-

    https://crm2011distributewf.codeplex.com/

    As Opp Asset is intermidiate (child) entity between opportunity and Asset therefore using is assembly you are able to update Opp Asset from Opportinity and Assets. 


    Regards Faisal

    Friday, January 23, 2015 4:36 PM
  • Thanks, Faisal. I have seen this workflow activity before on Codeplex. I was attempting to do this synchronously. I have downloaded it and it is working on Opp Asset. There is just a delay due to async. The record must be refreshed a few times.
    Friday, January 23, 2015 6:43 PM
  • Has anyone converted the DistributeWF to a plugin against specific entities?
    Friday, January 23, 2015 7:40 PM