Open rbhole opened 1 year ago
Have you tried
parent.AddRelatedLink(newChild, "Impacted by Risk");
Thank you @giuliov
Hello @giuliov, I have tried your example but I dont think that its working as supposed: Have you got a clue?
My code:
var childItem = store.GetWorkItem(child.Id); self.AddRelatedLink(childItem, "Aggregator created link");
but i get following error message:
Rule \u0027test\u0027 failed: (44,22): error CS1061: \u0027WorkItemWrapper\u0027 does not contain a definition for \u0027AddRelatedLink\u0027 and no accessible extension method \u0027AddRelatedLink\u0027 accepting a first argument of type \u0027WorkItemWrapper\u0027 could be found (are you missing a using directive or an assembly reference?)"
Update:
i found the error.
You have to use self.Relations.AddRelatedLink(..)
I want to create new related item NOT child item. My code as below,
I got error as below,
I gone through /scr from library... but unable to find out solution.