Bonjour
Je fais une requête Sharepoint :
Problème mon premier messagebox que je veux afficher ma Query m'affiche "Microsoft.SharePoint.Client.CamlQuery et pas ma requête, donc il ne me fait pas le WHeRE !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 SP.List list = _web.Lists.GetByTitle("Liste Gestion Absences"); //_clientcontext.Load(list); //_clientcontext.ExecuteQuery(); SP.CamlQuery camlQuery = new SP.CamlQuery(); string strQuery = "<Query><Where><Eq><FieldRef Name='N_x00b0__x0020_employ_x00e9_'></FieldRef><Value Type='Text'>5283</Value></Eq></Where></Query>"; camlQuery.ViewXml = strQuery; MessageBox.Show(camlQuery.ToString()); SP.ListItemCollection listItemCollection = list.GetItems(camlQuery); _clientcontext.Load(listItemCollection); _clientcontext.ExecuteQuery(); foreach(SP.ListItem listitem in listItemCollection) { MessageBox.Show(listitem["N_x00b0__x0020_employ_x00e9_"].ToString());
merci.
Partager