Skip to content

Instantly share code, notes, and snippets.

@AngelaIp
Created July 18, 2018 07:06
Show Gist options
  • Save AngelaIp/4d973bfad6ac7628fa1d23ed1b3f9025 to your computer and use it in GitHub Desktop.
Save AngelaIp/4d973bfad6ac7628fa1d23ed1b3f9025 to your computer and use it in GitHub Desktop.
Passing parameters from 'ItemType' Action body to Client Methods
/* Example body used in Action with Type 'ItemType'
<body>
<formId>1234570871854123453362C7B712345</formId>
<formTitle>My Example Form</formTitle>
</body>*/
var parser = new DOMParser();
var xmlDoc = parser.parseFromString(this,"text/xml");
var formId = xmlDoc.getElementsByTagName("formId")[0].childNodes[0].nodeValue;
var formTitle = xmlDoc.getElementsByTagName("formTitle")[0].childNodes[0].nodeValue;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment