It's all about the answers!

Ask a question

RTC Attribute customization default value doesn't work for a field


Anurag Patel (21363) | asked Jun 19 '18, 12:26 a.m.
edited Jun 19 '18, 12:28 a.m.

 Hello, 
I've defined a Default Values element in Attribute Customization in RTC 6.0.5 to a default value. 

It is not working,

Below is code return for defaultValue -


dojo.provide("com.example.common.CurrentDay");

(function() {
dojo.declare("com.example.common.CurrentDay", null, {

    getDefaultValue: function(attributeId, workItem, configuration) {

        var day = ( new Date() ).getDay();
        var dayName = "Unknown day";

        if (day == 0) dayName =  "Sunday";
        else if (day == 1) dayName =  "Monday";
        else if (day == 2) dayName =  "Tuesday";
        else if (day == 3) dayName =  "Wednesday";
        else if (day == 4) dayName =  "Thursday";
        else if (day == 5) dayName =  "Friday";
        else if (day == 6) dayName =  "Saturday";
        
        return dayName;
    }
});
})();

I have also debug the code. Found that the It is not executing at line -
getDefaultValue: function(attributeId, workItem, configuration) {
and flow directly goes to the last.
I have enable the Process Attachment Script to True.
Can you please suggest the some solutions.

Thanks in Advance.

Be the first one to answer this question!


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.