Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RM Open Social Gadget: How to create web link

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?

0 votes



One answer

Permanent link

 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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jan 22 '20, 5:02 p.m.

Question was seen: 846 times

Last updated: Mar 06 '20, 4:20 p.m.

Confirmation Cancel Confirm