TMN
Guest
|
Posted:
Thu Jan 20, 2005 6:24 am Post subject:
Adding Area Listings via Web Service interface |
|
|
I am building a proof-of-concept using SharePoint's web services. I have a
need to create an area dynamically from another system and then create a
listing to the new area in an existing area. I want the new listing to show
up under one I've created (not the Highlight, General, etc used
out-of-the-box). I've created several new groups and have existing listings
under them for my demo purposes. I extracted the group ID of one of them for
use in my demo code - I want my new listing to appear under it. However,
when I run my code, everything works fine except the listing always shows up
in the General group, not in my custom group (with an ID of 5). The code
below is a subset of the overall code - it creates the listing using the
CreateAreaListing method then attempts to edit the listing properties to
change the GroupID to 5. I changed the description as well to ensure that a
change is being made - the new description does appear, but the group ID
stays at 0. Any ideas?
Dim myListingID As Guid
Dim myListing As SPAreas.AreaListingData
myListingID = mySPAreaService.CreateAreaListing(myTestAreaGUID,
strSubAreaTitle, myNewSubArea.Description, SPAreas.ListingType.Site,
myNewSubArea.UrlNavigation)
myListing = mySPAreaService.GetAreaListingData(myListingID)
myListing.Description = "Hello world!"
myListing.GroupID = 5
mySPAreaService.SetAreaListingData(myListingID, myListing) 'commits change |
|