Notices


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-Nov-2009, 10:13 AM
Junior Member
 
Join Date: Nov 2009
Posts: 3
girardtim 0 reputation points
Default Problem with updating categories on a Posted Message

Hello,

It looks like there is a problem with the GW SOAP API when trying to update categories on a Posted Message.

I am able to create a Posted Message with categories, but when I try to update a Posted Message, the categories I specify are ignored.

I am able to update other item types such as a Contact with categories and this works.

Here's a code snippet of what am I using, it is almost exactly the same way I update the Contact, but for some reason this doesn't work for Posted Messages

private static bool UpdateNote(GroupWiseConfig config, string id, NoteFilter filterReplace)
{

var noteDelete = new GroupWise.Mail();
var note = new GroupWise.Mail();

var req = new GroupWise.modifyItemRequest
{
updates = new GroupWise.ItemChanges
{
update = note,
delete = noteDelete
}
};

note.categories = GroupWiseHelper.GetCategoryRefList(config, filterReplace.Categories);

req.id = id;
var old = GetNoteByID(config, id);

noteDelete.categories = GetDeleteCategories(old.categories, note.categories);

var resp = config.Login().modifyItemRequest(req);
}


public static GroupWise.CategoryRefList GetCategoryRefList(GroupWiseConfig config, string categories)
{
var crl = new GroupWise.CategoryRefList
{
category = GetCategoryIDs(config, categories)
};

if (crl.category != null && crl.category.Length > 0)
{
crl.primary = crl.category[0];
}

return crl;
}


The method GetCategoryIDs() will create a category if it doesn't exist and return the id.

Am I doing something wrong or is there a bug in the GW SOAP API?

Thanks
Reply With Quote
 

Tags
categories, posted message

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 10:37 AM.


© 2007 Novell, Inc. All Rights Reserved.

Search Engine Friendly URLs by vBSEO 3.3.0 RC2