It's all about the answers!

Ask a question

RM Open Social Gadget: How to create web link


Kirk Woods (10178) | asked Jan 22 '20, 5:02 p.m.

I have an open social gadget in RM that I would like to have create a web link to another system. The RM.Data.createLink appears to only link artifacts to other artifacts. Am I missing something, is there a different API call, or do I have to use REST?  If I have to use REST, are there any caveats I need to be aware of?

One answer



permanent link
Kirk Woods (10178) | answered Mar 06 '20, 4:10 p.m.
edited Mar 06 '20, 4:20 p.m.

 What I was missing is that I can create an artifact reference object and populate it with just the web link.  What I couldn't do was create a label for the web link like I can through the form.  The documentation for ArtifactRef states that there are no properties but that is not true, but there is a caveat about using the internal properties as they are subject to change in the future.

Here is the code:
var targetRef = new RM.ArtifactRef();
targetRef.uri = target;
RM.Data.createLink(artifact.ref, linktype, targetRef, function(result) {
    if (result.code != RM.OperationResult.OPERATION_OK){
        // handle error
    }
});    
The "target" value is the URL of the web link.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.