Personal tools

Log in

Changes

From All n One's bxp software Wixi

Jump to: navigation, search

JavaScript Self-Referencing Campaigns

1,379 bytes added, 13:13, 20 March 2012
no edit summary
The results have to be shown somewhere. This, to date, has been puti n the Notes section of a Section Header, somewhere in the script so..... add the following to a Notes section of a Section Header in your script.
 
<syntaxhighlight lang="javascript">
<div id='strHistory'></div><script language=javascript type=text/javascript src=https://ww3.allnone.ie/library/javascript/fn_javascript_ajax_campaign.js ></script>
</syntaxhighlight>
 
== Step 4. Call the Self-Referencing Function. ==
 
You need to modify the code below for it to work for you.
 
This gets placed in the JavaScript onLoad of the campaign.
Main Menu > Database Management > Database - Primary Details > Campaign - Edit > Choose your campaign > JavaScript onLoad subsection > Opening Code execution box.
 
 
 
<syntaxhighlight lang="javascript" line start="1">
/*--------------------------------------
// The Self Referencing Lookup settings
--------------------------------------*/
function fn_SelfReferencing() {
if (typeof aryAjax_Settings=="undefined")
alert("Library did not load");
else {
aryAjax_Settings[0] = "client_lev8marketing";
aryAjax_Settings[1] = "automated";
aryAjax_Settings[2] = "processing";
aryAjax_Settings[3] = "2";
aryAjax_Settings[4] = "strCDA_2_field_0_1";
aryAjax_Settings[5] = document.getElementById('strCDA_2_field_0_1').value;
aryAjax_Settings[13] = document.getElementById('intCDA_Id').value;
aryAjax_Settings[14] = "true";
aryAjax_Settings[15] = "strHistory";
aryAjax_Settings[6] = "intCDA_2_Id,strCDA_2_field_1_3,strCDA_2_field_3_3,strCDA_2_LastDateTime,intCDA_2_StaffId,strCDA_2_Status,strCDA_2_Comments";
aryAjax_Settings[12] = "Case,Firstname,Surname,DateTime,Staff,Outcome,Comment";
fn_Ajax_BE_Process();
}
}
</syntaxhighlight>
7,528
edits