Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. function consultBP() {
  2.  
  3. try
  4. {
  5. var customlist ;
  6. var clientContext = new SP.ClientContext.get_current();
  7. var oWebsite = clientContext.get_web();
  8. var oList = oWebsite.get_lists().getByTitle( 'WO_Projects' );
  9. var camlQuery = new SP.CamlQuery();
  10.  
  11. camlQuery.set_viewXml( '<View><Query><Where><Geq><FieldRef Name='ID'/>' +
  12. '<Value Type='Number'>1</Value></Geq></Where></Query></View>' );
  13.  
  14. this.customlist = oList.getItems( camlQuery );
  15. clientContext.load( this.customlist );
  16. clientContext.executeQueryAsync(
  17. Function.createDelegate( this, onQuerySucceededClarityID ),
  18. Function.createDelegate( this, onQueryFailedClarityID ));
  19.  
  20. }catch(err){
  21. erroSearchBP++;
  22. if( erroSearchBP < 100 ) setTimeout( function() { consultBP(); } ,200 );
  23. else alert( erroCarregarPagina );
  24. }
  25. }
  26.  
  27. function onQuerySucceededClarityID(){
  28. //........
  29. }
  30.  
  31. function onQueryFailedClarityID( sender, args ) {
  32. alert( "Failed" );
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement