Design Studio workflow trigger PA52.1

 1 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Judy Consoli
Veteran Member Send Private Message
Posts: 43
Veteran Member
We are trying to create a workflow trigger for the Change transaction via design studio.

When we try to add variables for the workflow trigger we cannot match the workunit field variable to the form variable for those fields on Selected Items 1 because this is an array.

Has anyone ever successfully accompished this.  We worked with Lawson Support and they suggested we query the Lawson Community

Thanks in advance.

Judy Consoli
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
Whenever I need to to create a trigger, I just make an AGS call to WFWK: something like this that gets called on_aftertransaction:

function Create_WU()
{

var s = portalWnd.AGSPath;
s += "?_PDL=";
s += portalWnd.oUserProfile.getAttribute("productline");
s += "&_TKN=WFWK.1&_EVT=ADD&_RTN=DATA&_LFN=ALL&_TDS=IGNORE";
s += "&FC=A&SERVICE=MARECON&WORK-TITLE=MA60.3";
// alert("1");
s += "&OBJECT-NAME=APISET1";
s += "&CRITERION-1=" + vCompany;
s += "&CRITERION-2=" + vCompany;
s += "&CRITERION-3=" + vCompany;
s += "&KEY-VALUE1=" + ZeroFill(vCompany,4);
s += "&KEY-VALUE2=" + vVendor;
s += "&KEY-VALUE3=" + vInvoice;
s += "&KEY-VALUE4=" + ZeroFill(vSuffix,3);
s += "&KEY-VALUE5=" + ZeroFill(vCancelSeq,4);

// alert("2");
s += "&VARIABLE-NAMEr0=COMPANY";
s += "&VARIABLE-VALUEr0=" + vCompany;
s += "&VARIABLE-NAMEr1=VENDOR";
s += "&VARIABLE-VALUEr1=" + vVendor;
// alert("3");
s += "&VARIABLE-NAMEr2=INVOICE";
s += "&VARIABLE-VALUEr2=" + vInvoice;
s += "&VARIABLE-NAMEr3=SUFFIX";
s += "&VARIABLE-VALUEr4=" + vSuffix;
s += "&VARIABLE-NAMEr4=CANCEL_SEQ";
s += "&VARIABLE-VALUEr4=" + vCancelSeq;
// alert("4");
s += "&_DELIM=%09&_OUT=XML&_EOT=TRUE";

// alert(s);
var sAGSInfo = portalWnd.httpRequest(s);
if (!sAGSInfo || sAGSInfo.status)
{
alert("AGS error " + sAGSInfo.status);
return false;
}