Would really appreciate any help I could get on this.  Have been
reading everylast group post, help item and API note I could find, but
still stuck.  Here is a synopsis...

I recently installed the .Net API for remedy and had everything working
very smooth (thanx to some other posts in this group) all the way up
until the CreateEnty method.

I have a form in remedy that I need to autopopulate based on what a
user fills out in a separate web page (for various reasons, they are
not allowed directly into either remedy or mid-tier).  So, I created
the page, submitted the info to a separate .aspx page, where that
linked up with remedy in the background via VB.Net. This is where it
started to get complicated.

With the API, I was able to:
- create and confirm a connection to the server.
- open my form and list all field with their name, id and type
- create a FieldValueList
- and finally, create an entry with the field value list.

My problem is that the last step neither creates a new entry, nor does
it throw an error. As far as I know, when you create an entry either
one or the other of the two should happen.

We checked the logs from Remedy and verified successfull log in to the
system, and multiple SELECT queries against not only the form, but the
fields too.  But nowhere did any data actually get posted/written.

Here is my code:

IM remedyServer  ' Remedy Server Connection
DIM fieldList         ' Form Fields to Populate
DIM subject          ' Subject of Remedy Form (not grabbed previously)
DIM details           ' Concatenated Details for Form

remedyServer = CreateObject("BMC.ARSystem.Server")
remedyServer.Login("ServerName","ID","Password","")

' Non-form Info
subject = "ticket subject"
details = "some extraneous details")

' Create Form Fields and Populate
fieldList = CreateObject("BMC.ARSystem.FieldValueList")
fieldList.add(System.Convert.ToUInt32(200000012),
Request.Form ("F_Area"), 4)
fieldList.add(System.Convert.ToUInt32(240000001),
Request.Form("F_Display"), 4)
fieldList.add(System.Convert.ToUInt32(240000005),
Request.Form("F_UID"), 4)
fieldList.add (System.Convert.ToUInt32(240000007), details, 4)
fieldList.add(System.Convert.ToUInt32(250100007),
Request.Form("F_Phone"), 4)
fieldList.add(System.Convert.ToUInt32(260000008), subject, 4)

' Create/Submit Entry
DIM entryID AS String
entryID = remedyServer.CreateEntry("Valid Form Name", fieldList)'
Submit Form Entry
response.write("Entry: " & entryID.ToString & "<BR><BR>")

'Logout of server
remedyServer.Logout

Notes on code:
- Changed server/id/pwd/form name here for security reasons. Originals
work, no prob.
- Had to convert field ID to UInt32 for the API to not throw an error.
- Also, have verified that the id#s are corret (throws errors
otherwise).
- All values passed to the fieldList are strings
- The createEntry was originally in a Try/Catch block, but was not
throwing any errors, and not giving an ID number either.

Any suggestions?

Thanx in advance,
-Chris

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

Reply via email to