It's all about the answers!

Ask a question

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


Steven Hovater (661) | asked Jul 11, 8:06 a.m.

 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

One answer



permanent link
Steven Hovater (661) | answered Jul 11, 8:30 a.m.

 Got it.

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

Your answer


Register or to post your answer.