User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
before_subscribe_script [2017/07/19 12:11]
ashkan.ghafari [About]
before_subscribe_script [2017/07/19 12:27] (current)
Line 102: Line 102:
 current.short_description = gr_before.short_description;​ current.short_description = gr_before.short_description;​
 </​code>​ </​code>​
 +==== Accessing the XML Object of the Inbound Record ​ ====
 +<wrap info>​[[updateset_releases|v3.25.0]]</​wrap>​
 +For cases where the inbound record is different from the subscribing table (i.e. it has extra fields that the table on the subscribing instance doesn'​t have), you can now reference the XML object directly using the qcurrentxml variable.
 +The xml_util variable allows you to access values from the qcurrentxml object using getElementValueByTagName() function. This functions takes in two parameters, the XML object (qcurrentxml) and the name of the field in the XML.
 +For example, if you want to access the '​dv_priority'​ field'​s value in the XML and save it into the inbound record'​s short_description field:
 +if (qcurrentxml) {
 +    var elemValue = xml_util.getElementValueByTagName(qcurrentxml,​ '​dv_priority'​);​
 +    current.short_description = elemValue;
 +Note: It is suggested that you check if qcurrentxml exists in case of any issues decrypting the value and getting the XML object. ​
before_subscribe_script.txt ยท Last modified: 2017/07/19 12:27 by ashkan.ghafari