This project has moved and is read-only. For the latest updates, please go here.

Creating discussion list items and returning expanded author information

Sep 22, 2015 at 11:54 PM
I'm using SPServices to create new list items in a discussion list like so:
  operation: "UpdateListItems", 
  batchCmd: "New", 
  listName: discListName,
  updates: "<Batch OnError='Continue' >" + 
                "<Method ID='1' Cmd='New'>" + 
                    "<Field Name='ContentType'>Discussion</Field>" + 
                    "<Field Name='FSObjType'>1</Field>" + 
                    "<Field Name='Body'>" + msgBody + "</Field>" + 
                "</Method>" + 
That returns an item that includes all the info about the newly created item like ID number and author. But the author is just the name and I would like to get the expanded user information. With a CAML query I can add this to the query.
CAMLQueryOptions: "<QueryOptions>" +
                      "<ExpandUserField>True</ExpandUserField>" +
Is there a way to UpdateListItems and get expanded user information back to the "done" handler?

I poked around in the SPServices code and looked at Microsoft's documentation and didn't see anything. But I just wanted to be sure that I wasn't missing something obvious.
Sep 22, 2015 at 11:57 PM
No, you can't tell UpdateListItems what to return.

However, you know the author because that's the person who just did the update?

Sep 23, 2015 at 12:30 AM
Thank you for confirming that.

Yes it will be the current user. Both SPGetCurrentUser and SP.Web.get_currentUser () are slightly different than expanded user info from GetListItems. Just trying to have less complexity if possible.