RM.Data.createLink results in OPERATION_BAD_REQUEST (DNG JS API)
![]()
Hello everybody,
i'm trying to link two DNG resources via TypeScript (i.e. DNG JavaScript Api). The following operation results in OPERATION_BAD_REQUEST : RM.Data.createLink(this.artifact, RM.Data.LinkTypes.EMBEDS, pickedModule, function(result) { console.log("Link-Status: " + result.code + " - " + result.message); }); this.artifact : Single resource retrieved by RM.Event.subscribe(RM.Event.ARTIFACT_SELECTED ...) pickedModule : Module resource retrieved by RM.Client.showArtifactPicker(...) Both resources exist in within the callback function. Does anyone has an idea, what might be the problem? Best regards -- Thomas Noack |
One answer
![]()
The function works as expected, at least with RNDG 5.0.1. Without further details, it's hard to say what problem you were facing. I would guess either of the two artifacts in the function call is invalid (undefined or something).
To determine, examine the /rm/links POST request payload using a network tracing tool such as Firebug or the Chrome built-in tool. You should see the "subject", "object" and "predicate" well defined. Or you can set a break point at the code where the "createLink" function is and check whether "this.artifact" and "pickedModule" are valid (of the type RM.ArtifactRef) at run time. |
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.