Hi Everyone.
We have one pluign1 which triggers on Create event of "CD" entity.
Inside this pluign we updating the target "CD" record... (we are processing some complex logic, that's the reason we are updating it inside pluign, we can't change this now)
We also have plugin2 which triggers on Create & Update event of "CD" entity and running in async mode.
Inside this plugin we creating the "RD" record(child record of "CD").
Issue is, pluign2 creating 2 RD records on create of CD record.
To avoid this:
In pluign2, we have one condition of "if (context.Depth > 1) return;"
In pluign2, we also check the if RD is already exist(via fetchxml) - if NO then only we are creating RD record. This check is not working as it should. We found in trace that, "RD already exist" code doesn't found any record. What would be the reason?
*This post is locked for comments