It's all about the answers!

Ask a question

In an RM extension, is it possible to change the content (not attributes) of an artifact?

Keith Eberhard (19111) | asked Mar 01 '19, 11:22 a.m.

I would like to change the content (not attributes) of an artifact directly in an RM (DNG) extension. Is this possible?

One answer

permanent link
Preston Berkeley (1212) | answered Mar 04 '19, 4:08 p.m.

Yes.  The Client API allows you to do this.  To set the "Content," use Primary Text, which will is referenced as RM.Data.Attributes.PRIMARY_TEXT in your code.  So if item is of type RM.ArtifactAttributes for your artifact, something like this will set the content.  

var toSave = [];
item.values[RM.Data.Attributes.PRIMARY_TEXT] = "New Value of Content Here";
RM.Data.setAttributes(toSave, function(result){
    if(result.code !== RM.OperationResult.OPERATION_OK)
        // error handling code here
This is only a slightly edited version of the sample code for setAttributes in the Client Extension API here (  To get the RM.ArtifactAttributes data type(item above), as easy way to start is using RM.Client.showArtifactPicker to get the RM.ArtifactRef, and then give the result of this to RM.Data.getAttributes to get the RM.ArtifactAttributes.

Your answer

Register or to post your answer.