setEntry not working for RKM:KnowledgeArticleManager

2013-04-25 Thread Nathan Brandt
I am trying to modify Title of a Knowledge Article via Remedy Java APIs.
This is what I am doing in a nutshell. I don't get any error, but Title
does not get modified. Any clues what might be wrong?
Entry gets retrieved properly as a result of getOneEntryObject, but
setEntry does not work.

String qualification = '302301021' = \ + articleGuid + \;
QualifierInfo qual1 =
context.parseQualification(RKM:KnowledgeArticleManager, qualification);

int[] fieldIds1 = {1};
OutputInteger nMatches1 = new OutputInteger();
// Retrieve entries from the form using the given qualification.
Entry searchEntry =
context.getOneEntryObject(RKM:KnowledgeArticleManager, qual1, null,
fieldIds1, true, nMatches1);
String requestId = searchEntry.get(1).toString();

Entry newEntry = new Entry();
// 302300502 is the field id of Title
newEntry.put(302300502, new Value(Neue Title));

context.setEntry(RKM:KnowledgeArticleManager, requestId, newEntry,null,0);


~ Nathan

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Where the Answers Are, and have been for 20 years


Re: setEntry not working for RKM:KnowledgeArticleManager

2013-04-25 Thread Longwing, Lj
Nathan,
Instead of creating a new Entry object, why don't you do a set of the
existing entry, and then do a setEntry of that?...probably easier


On Thu, Apr 25, 2013 at 9:58 AM, Nathan Brandt nathanrbra...@gmail.comwrote:

 **
 I am trying to modify Title of a Knowledge Article via Remedy Java APIs.
 This is what I am doing in a nutshell. I don't get any error, but Title
 does not get modified. Any clues what might be wrong?
 Entry gets retrieved properly as a result of getOneEntryObject, but
 setEntry does not work.

 String qualification = '302301021' = \ + articleGuid + \;
 QualifierInfo qual1 =
 context.parseQualification(RKM:KnowledgeArticleManager, qualification);

 int[] fieldIds1 = {1};
 OutputInteger nMatches1 = new OutputInteger();
  // Retrieve entries from the form using the given qualification.
 Entry searchEntry =
 context.getOneEntryObject(RKM:KnowledgeArticleManager, qual1, null,
 fieldIds1, true, nMatches1);
 String requestId = searchEntry.get(1).toString();

 Entry newEntry = new Entry();
 // 302300502 is the field id of Title
 newEntry.put(302300502, new Value(Neue Title));

 context.setEntry(RKM:KnowledgeArticleManager, requestId,
 newEntry,null,0);


 ~ Nathan

 _ARSlist: Where the Answers Are and have been for 20 years_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Where the Answers Are, and have been for 20 years