Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

DNG javascripting - practical example of using RM.Data.getCurrentUser ?

 Hi all

Using 6.0.6.1, 
// Report the ID of the current user
reportUserId = function() {
    RM.Data.getCurrentUser(function(result.data) {
        if (result.data) {
            report('Current user is: ' + result.data.userId);
        } else {
            error('Unable to determine current user.');
        }
    });
};
    
So, where does "result" come from?

Working example, anyone?

thanks,
Steve

0 votes



One answer

Permanent link

 Got it.

RM.Data.getCurrentUser(function(result) {
if (result) {
println('Current user is: ' + result.data.userId);
} else {
println('Unable to determine current user.');
}
});

1 vote

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jul 11 '19, 8:06 a.m.

Question was seen: 1,883 times

Last updated: Jul 11 '19, 8:30 a.m.

Confirmation Cancel Confirm