Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Get XML source of any object in adobe via JSAPI

Avatar

Avatar
Springboard
MVP
MarcelSzimonisz
MVP

Likes

102 likes

Total Posts

225 posts

Correct Reply

56 solutions
Top badges earned
Springboard
Establish
Contributor
Give Back 25
Give Back 10
View profile

Avatar
Springboard
MVP
MarcelSzimonisz
MVP

Likes

102 likes

Total Posts

225 posts

Correct Reply

56 solutions
Top badges earned
Springboard
Establish
Contributor
Give Back 25
Give Back 10
View profile
MarcelSzimonisz
MVP

14-12-2016

Hello all,

is there any JSAPI function or a way to get the XML source of any object within adobe campaign as if you would display it in the console client?

 

Kind regards,

Marcel

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

15-12-2016

Hello Marcel,

You can use toDocument and toXMLString functions. For example to retrieve a specific workflow: 

var wf = NLWS.xtkWorkflow.get(18846582); logInfo(wf.toDocument().toXMLString());

Hope this helps,

Florent

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
Level 1
blair_elzinga
Level 1

Likes

4 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 1
blair_elzinga
Level 1

Likes

4 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
blair_elzinga
Level 1

11-05-2017

On a related note, you can get the structure of tables through the SOAP API - here's an example for a table 'foo':

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xtk:queryDef">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:ExecuteQuery>
         <urn:sessiontoken>...my token...</urn:sessiontoken>
         <urn:entity>
<queryDef operation="select" schema="xtk:srcSchema"  >
    <select>
        <node expr="@mappingType"/>
    </select>
    <where>   <!-- here's how to get a specific table structure details -->   
      <condition expr="@name = 'leadListDetails'"/>    
    </where> 
</queryDef>
         </urn:entity>
      </urn:ExecuteQuery>
   </soapenv:Body>
</soapenv:Envelope>

Note that the 'queryDef' node is a child of <urn:ExecuteQuery><urn:entity>

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

15-12-2016

Latest JSAPI versions should be available on the Download Center of the support portal. But as they are under license, it may be necessary to ask Support to give you the necessary rights (if you are eligible) to see it.

Florent.

Avatar

Avatar
Springboard
MVP
MarcelSzimonisz
MVP

Likes

102 likes

Total Posts

225 posts

Correct Reply

56 solutions
Top badges earned
Springboard
Establish
Contributor
Give Back 25
Give Back 10
View profile

Avatar
Springboard
MVP
MarcelSzimonisz
MVP

Likes

102 likes

Total Posts

225 posts

Correct Reply

56 solutions
Top badges earned
Springboard
Establish
Contributor
Give Back 25
Give Back 10
View profile
MarcelSzimonisz
MVP

15-12-2016

Thank you very much. This was exactly I was looking for. I have another question tough: where can i get the latest JSAPI help file as I mine is from 2013  🙂

I have used this to get all workflows which use a particular list:

var query = xtk.queryDef.create( <queryDef schema="xtk:workflow" operation="select"> <select> <node expr="@id"/> <node expr="@label"/> <node expr="@internalName"/> </select> </queryDef> ) var res = query.ExecuteQuery(); var adobeId = 192400121; for each (var w in res.workflow){ var workflow = xtk.workflow.load(w.@id); if (workflow.toDocument().toXMLString().indexOf(adobeId) != -1) logInfo(w.@internalName + ";" + w.@label); }

 

Thank you,

Marcel