I have some strange issue with server object model... I am creating timerjob, its has to just run item.update()
function and rest of work is done by event receiver.
server url - demo2010a:2010
sitecolletion url - http://www.contoso.com/sites/test/
list url - http://www.contoso.com/sites/test/Lists/Zadania%20naprawcze%20t/
the problem is in:
SPSite site = new SPSite("http://www.contoso.com/sites/test/");
SPWeb web = site.OpenWeb("sites/test");
SPList ldk_List = web.GetList("http://www.contoso.com/sites/test/Lists/Zadania naprawcze t"); //this is working fine ! but i cant use absolute URL !!!
SPListItem item = ldk_List.GetItemById(5);
item["Title"] = "testestestestes";
item.Update();
this is my "Test" code. List name is "Zadania Naprawcze -t" in url its look strange but it is working with http://www.contoso.com/sites/test/Lists/Zadania naprawcze t
i want something like : web.GetList("/sites/Zadania Naprawcze -t")
; or something i tried to cut the -
etc. could someone tell me what should to do? All the code is running as Timer Job.