How to read exportToAAM activities data from javascript?

Avatar

Avatar
Validate 1
Level 1
vitor_d
Level 1

Likes

0 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
vitor_d
Level 1

Likes

0 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
vitor_d
Level 1

23-06-2021

I am trying to access exportToAAM activitiy data inside a javascript block, but I am unable to do so. Here is my code:

var groupQuery = "SELECT iWorkflowId FROM XtkWorkflow";
var groupsXML = sqlSelect(
  "collection,iWorkflowId:int", 
   groupQuery
   );

for each(var group in groupsXML.collection){
  var wkf = NLWS.xtkWorkflow.get(group.iWorkflowId);
  logInfo(wkf.activities.exportToAAM.label);
  logInfo(wkf.activities.exportToAAM[0].label);
}

 

I have also tried to query mData and read it as an DOMDocument, but didn't work either. I feel like activities/exportToAAM is not being returned in the XML.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Shape 1
Level 4
CedricRey
Level 4

Likes

36 likes

Total Posts

78 posts

Correct reply

19 solutions
Top badges earned
Shape 1
Boost 25
Applaud 5
Affirm 5
Give Back 3
View profile

Avatar
Shape 1
Level 4
CedricRey
Level 4

Likes

36 likes

Total Posts

78 posts

Correct reply

19 solutions
Top badges earned
Shape 1
Boost 25
Applaud 5
Affirm 5
Give Back 3
View profile
CedricRey
Level 4

24-06-2021

Hi @vitor_d 

Just tried your code and I think where is the problem : you use the "get" method instead of the "load" method to have your workflows.

I didn't know it, but the 'get' method doesn't load the workflow the same way as the 'load' one (the only difference I was aware of is the 'load' method needs to use the 'save' method to save changes, as the 'get' doesn't).

Can you change the line

NLWS.xtkWorkflow.get(group.iWorkflowId);

to

NLWS.xtkWorkflow.load(group.iWorkflowId);

That way I got result.

 

Let me know if it's ok ?

 

Thank you,

Cédric

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 50
Employee
Sukrity_Wadhwa
Employee

Likes

158 likes

Total Posts

928 posts

Correct reply

35 solutions
Top badges earned
Give Back 50
Validate 1000
Validate 500
Validate 250
Validate 100
View profile

Avatar
Give Back 50
Employee
Sukrity_Wadhwa
Employee

Likes

158 likes

Total Posts

928 posts

Correct reply

35 solutions
Top badges earned
Give Back 50
Validate 1000
Validate 500
Validate 250
Validate 100
View profile
Sukrity_Wadhwa
Employee

01-07-2021

Hi @vitor_d,

Was the given solution helpful to resolve your query or do you still need more help here? Do let us know.

Thanks!