It's all about the answers!

Ask a question

Calculated value custom attribute dont work in Web UI

Alvaro Riera (4011318) | asked Jan 17 '13, 3:28 a.m.
edited Apr 02 '13, 4:42 a.m. by Ralph Schoon (63.2k33646)
 Hi, i have create some calculated value scripts and all are working well in Eclipse but not in Web UI.
Im working with CLM 4.0.1
My logs are clear so no errors of javascript.

An example of a basic script:

(function() { 
var WorkItemAttributes=;
    dojo.declare("com.example.SolicitanteCodigoTicket", null, { 
        getValue: function(attribute, workItem, configuration) { 
return "some string";

Ok, i have debugged it with Opera and in lang.Runtime.js i can see that dojo.getObjet(typeName); returns undefined.
typeName's value is "com.example.SolicitanteCodigoTicket" so its ok.


dojo.mixin(, {
typeForName : function typeForName_$0(typeName) {
var ctor= dojo.getObject(typeName);
if (!ctor) {
ctor= dojo.getObject(typeName);
if (ctor == null) {
throw new Error("Unknown type");
return ctor;  // <-------- ctor calue is UNDEFINED

Any idea of how can i solve it please?

4 answers

permanent link
Alvaro Riera (4011318) | answered Jan 17 '13, 4:32 a.m.
 Hi Ayan,
The error occurs in lang.Runtime.js i cant modify it, its internal from jdojo (

The typeName's value "com.example.SolicitanteCodigoTicket" its ok cause is the class i have provided in my script: dojo.provide("com.example.SolicitanteCodigoTicket");

but dojo.getObject(typeName); returns undefined

Thank you anyway!

Ayan Paul commented Jan 17 '13, 4:38 a.m.

do you have any id for the custom attribute. use that instead of typename.

permanent link
Ayan Paul (2552230) | answered Jan 17 '13, 3:39 a.m.
instead of name try with id of that field

permanent link
Ralph Schoon (63.2k33646) | answered Jan 17 '13, 4:40 a.m.
If you use Opera, you might want to try one of the supported Browsers instead. See the system requirements for what is supported.

See the Enactment workshop Lab 5 for more tips on JavaScript:

Alvaro Riera commented Jan 17 '13, 5:40 a.m.

Hi Ralph, i use Opera just to debug.

I forgot write that i have tried it in FF15, Chrome and IE 9.
Same result, scripts dont work.

Server is configured correctly all works in Eclipse and some other scripts runs ok in web UI but those calculated value dont.

Ty for your answers

permanent link
Ralph Schoon (63.2k33646) | answered Apr 02 '13, 4:43 a.m.
You say your logs are clear. Please note that the logs that show JavaScript are not ccm.log or jazz.log. Please see for more details. Lab 5 talks about Java Script. The workshop has been verified with 4.x.

Your answer

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