I can't get Systemdata-ActivityName
Dear all
I want to get systemdata -ActivityName, I used JavaScript code like this
var options = {};
options.tokenNames = ["HomeDirectory", "SystemUserName","ActivityName"];
// (or) options.tokenNames="HomeDirectory";
//If only 1 token name, specify tokenNames as a string. If more than one token name, specify tokenNames as an array.
eFormHelper.getSystemData(options, function (result) {
if (result.isSuccess) //Checks if the method completes successfully and returns a response.
{
console.log (result.data); //Logs the data and displays an array of variable names and values.
}
else
{
console.log(result.error); //Logs the error and error description, if any.
}
});
result like this:
- 0: {Name: 'ActivityName', Value: ''}
- 1: {Name: 'HomeDirectory', Value: 'c:\\Program Files\\....'}
- 2: {Name: 'SystemUserName', Value: 'AgilePoint'}
- length: 3
- [[Prototype]]: Array(0)
I got "HomeDirectory" and "SystemUserName",but I can't get "ActivityName",does anybody know why?
-
Jenny,
I opened a form in My Task under work center and pasted your code in chrome developer console to try your JavaScript. Your code is returning back Activity Name in console.
Then I tried to open form in My Apps and pasted your code in developer console, here value is empty. This is because the Submit form does not have process instance.
Reference screenshot:


Regards,
Harish
請登入寫評論。
評論
1 條評論