I can not get the values of Artifact attributes
Hello ,
I'm working on a basic script that displays the Name and the type of the selected artifact ;
I tried with a script that i have found here "http://www.islandtraining.com/blog/extending-doors-next-generation-part1/"
but I did not get any displayed value.
I tried to customize it and what i get as the return value is "undefined"
here is my code :
function onselection(selected)
{
if(selected.length == 1)
{
prompt("entred","1");
RM.Data.getAttributes(selected,RM.Data.Attributes.Name, function(result)
{
document.getElementById("attributes").innerHTML="Artifact Name : " + result[RM.Data.Attributes.NAME];
});
}else document.getElementById("attributes").innerHTML="failed";
}
RM.Event.subscribe(RM.Event.ARTIFACT_SELECTED, onselection);
One answer
What are you trying to do? Your code makes no sense to me.
I suggest you take a good read of the official documentation and samples.
https://jazz.net/wiki/bin/view/Main/RMExtensionsMain
Once you're comfortable with those samples, you can then start writing your own codes.
Comments
karim taoudi
Mar 27 '17, 7:20 p.m.Here are more details about what I am trying to do :