Do you need update ticket status, this article describes how to do it. there is some ways where you can update here it's written using "updateObject" and "changeStatus".
"updateObject" It's a powerfull method where you can update many things and i've been writing so many ways how do use it.
"changeStatus" You can update ticket status and also say who updated.
Enjoy, i hope this article can be usefull for you.
int sid;
try
{
localhost.USD_WebService ws = new localhost.USD_WebService();
sid = 0;
sid = ws.login("servicedesk", "MyPassword");
}
catch { }
CA SDM::. Webservice login C#
Update status using updateObject Method
int sid;
string[] attrVals = new string[2] {"status","CL"};
string[] attributes = new string[2] { "status", "summary" };
string objecthandle;
try
{
localhost.USD_WebService ws = new localhost.USD_WebService();
sid = 0;
sid = ws.login("servicedesk", "password");
objecthandle = "cr:" + Request.QueryString["id"]; //"cr:400001"
ws.updateObject(sid, objecthandle, attrVals, attributes);
}
catch { }
Update status using changeStatus method
bool fnUpdateStaus(string id, string contact, string status, string comments)
{
bool blnReturn = false;
int sid;
string[] attrVals = new string[2] { "status", status };
string[] attributes = new string[2] { "status", "summary" };
string objecthandle, objecthandleCnt = "";
try
{
ServiceReference1.USD_WebServiceSoapClient ws = new ServiceReference1.USD_WebServiceSoapClient();
string user = ConfigurationManager.AppSettings["user"].ToString();
string password = ConfigurationManager.AppSettings["password"].ToString();
sid = 0;
sid = ws.login(user, password);
objecthandle = "cr:" + id;
if (!String.IsNullOrEmpty(contact))
{ objecthandleCnt = "cnt:" + contact; }
ws.changeStatus(sid, objecthandleCnt, objecthandle, comments, status);
ws.logout(sid);
blnReturn = true;
}
catch(Exception e)
{
blnReturn = false;
}
return blnReturn;
}
link_C#.zip
CA SDM::. webservice updateObject usando C#
CA SDM::. Webservice Updateobject C#
CA SDM::. webservice updateObject usando C#
CA SDM Trabalhando com WebService
Outros conteúdos utilizando updateObject
Summary CA Process Automation
Summary CA Service Management Community
Service Desk Manager 15 days Implementation
CABI:: Summary - BOXI for CA SDM
Summary CA SDM Scoreboard
Was useful, please leave your feedback!