Many of us would like to know how to interact with Remedy ticketing system using .NET framework. This is fairly easy to accomplish following several steps:
NOTE: .NET API is backward compatible. So you can use 7.1 with 6.3 server.
"C:\ARAPI.NET" -> LIB
"C:\ARAPI.NET" -> PATH
C:\ARAPI.NET>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\regasm "C:\ARAPI.NET\BMC.ARSystem.dll" /codebase
Microsoft (R) .NET Framework Assembly Registration Utility 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Types registered successfully
C:\ARAPI.NET>
// Create Remedy Ticket
// C#
// Copyright (C) 2008 Paul Greenberg. All Rights Reserved.
// http://www.isrcomputing.com
// Tested under .NET v1.1.4322
using System;
using System.Net;
using System.IO;
using System.Text;
using BMC.ARSystem;namespace Isrcomputing {
class CreateRemedyRequest {
[STAThread]
static void Main(string[] args) {try {
BMC.ARSystem.Server server;
server = new BMC.ARSystem.Server();
server.Login("remedyserver01", "myusername", "mypassword"); // Change this to your server, username , password
String formName = "HPD:HelpDesk";
BMC.ARSystem.FieldValueList fieldValues = new BMC.ARSystem.FieldValueList();
// Create an entry
fieldValues[8] = "C# - Generation II - Ticket that was automatically generated";
fieldValues[240000007] = "Net Trials....\n\rChecking possibilities";
// Category Field
fieldValues[200000003] = "Remedy";
// Type field
fieldValues[200000004] = "Import";
// Item Field
fieldValues[200000005] = "Assets";
// Case Type
fieldValues[260000130] = "Incident";
// Status
fieldValues[7] = "New";
// Priority
fieldValues[260000126] = "Low";
// Login+
fieldValues[240000005] = "myusername";
// Name+
fieldValues[240000001] = "Joe Shmo";
// Agency
fieldValues[200000012] = "ISRCOMPUTING";
// Location
fieldValues[200000007] = "50 Broadway";// Department
fieldValues[200000006] = "Operations";
//BMC.ARSystem.EntryIdList entryId = server.CreateEntry(formName, fieldValues);
string entryId = server.CreateEntry(formName, fieldValues);
Console.WriteLine("Created Entry: " + entryId.ToString());
server.Logout();
} catch(Exception e) {
Console.WriteLine("ARSystem.Exception caught\n" + e.ToString()); }
}
}
}
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe" /lib:C:\ARAPI.NET /reference:BMC.ARSystem.dll /define:DEBUG /optimize /out:createremedyticket.exe createremedyticket.cs
Many thanks to Oto Slavos from BMC Remedy Team, who helps developers around the globe to achieve their goals!
We have 9 guests and no members online