I am trying to extract the
ListItem ID of a List which I am currently NOT in based on a field value in that List. I cant find anything that explains how to do this.
So, to explain. I have a Custom List called 'Department'. I have another Custom List called 'Article'. I have a field in the 'Article' List which is a Lookup to the 'Title' field in the 'Department' List
All solutions I can find on the web connect to the List using the 'getItemById' method, but I don't know the ID as that is what i'm trying to return (e.g. below)
var ctx = SP.ClientContext.get_current(); this.web = ctx.get_web(); this.list = web.get_lists().getByTitle("Department"); this.listItem = list.getItemById(x);
Can anyone point me in the right direction on how I would go about doing this?