This section want to give create ticket operation / step
CREATE TICKET
Will let you create a ticket on a particular form of the Remedy Server with the fields you has populated.
// creates entry
Entry entry = (Entry)entryFactory.newInstance();
// populates context into the entry - from last posting (Create Context)
entry.setContext( context );
// set the name of the form name
entry.setSchemaID( new NameID( ARS_FORMNAME ) );
// This is an array of EntryItem, which contains the number of
// fields to store to Remedy. Assume there are only two fields.
EntryItem[] entryItems=new EntryItem[2];
// assumes the field ID is 100 for this field.
entryItems[0] = new EntryItem(new FieldID(100), new Value (“some value”));
// assumes the field ID is 2 for this field.
entryItems[1] = new EntryItem(new FieldID(2), new Value(“test value”));
// set the entry items to the entry.
entry.setEntryItems( entryItems );
// creates the ticket in remedy
entry.create();
// releases memory used by this entry.
entryFactory.releaseInstance( entry );
I hope this serves like a beginners remedy integration tutorial, next post will be on update and retreive tickets.
Thursday, October 22, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment