when using the "create item"-action I have the option the get the ID of the element that I am creating. This allows me to set a "set item permission" on exactly this element that I created.
I need to use the web service "lists.asmx" to create the item, but I don't know if there is a way to get the ID of the created element.
Can you help?
When you create a new list item using the UpdateListItems method, the response content should contain the XML node for the updated rows (including the item ID). You should be able parse out the ID out from that response content using a query XML action and/or a Regular Expression action.
This MSDN article should provide more context for what is returned.
if I had put in a little bit more effort I would have found it.
So now I am starting the web service "lists.asmx" with the following code:
<?xml version="1.0" encoding="utf-8"?>
<Method ID="1" Cmd="New">
Then I am using the Query-XML-action to get the ID with "//z:row/ows_ID".
That will give me the correct ID.
Thanks a lot