As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi, I am using Alfresco community version: 5.2.0 (r135134-b14)
I have document of my own type.({http://www.alfresco.com/model/mymodel/mytype}mytype) with name "My Document Type"
I want to get name of record type in rule script. How can I get it?
var TYPE = document.type; returns TYPE {http://www.alfresco.com/model/mymodel/mytype}mytype
In Java I can get name of record using dictionaryService
TypeDefinition type = dictionaryService.getType(QName.createQName("{http://www.alfresco.com/model/mymodel/mytype}mytype"));
I cannot find any possibility in Script API to achieve this.
Have you tried to use this?
document.typeShort;
What he means is to access the dictionary definition of the type. There is no Script API for this. In previous projects I created my own thin wrapper whenever necessary, or used the Java interopability features to access the DictionaryService from JavaScript (which is cumbersome and not recommended for regular development, but for JavaScript Console use cases).