Files
Mareon/ax/SRC/A_AcceptServiceTask.js
2015-01-21 12:41:03 +00:00

32 lines
930 B
JavaScript

// --------------------------------------------------------------------------------------
// A_AcceptServiceTask.js
// Copyright 2014 SG|facilitor. 053-4800 700, helpdesk@sgfacilitor.nl
// Written by MB (2014)
//
function A_AcceptServiceTask(v_company_id, v_taskId)
{
var v_API = "acceptServiceTask";
var v_req = "<acceptServiceTask xmlns=\"http://tempuri.org/\">"
+ " <companyId>" + v_company_id + "</companyId>"
+ " <taskId>" + v_taskId + "</taskId>"
+ " </acceptServiceTask>";
var v_type = 0;
var v_resp = apiAX(v_API, v_req, v_type);
if (v_type == 1 && v_resp != "")
{
oStream = new ActiveXObject("ADODB.Stream");
oStream.Open();
oStream.Type = 1; // adTypeBinary
oStream.Write(v_resp); // responseText geeft encoding problemen!
oStream.SaveToFile ("Log/test" + v_supplier_id + ".xml", 2);
oStream.Close();
}
return v_resp;
}