Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function consultBP() {
- try
- {
- var customlist ;
- var clientContext = new SP.ClientContext.get_current();
- var oWebsite = clientContext.get_web();
- var oList = oWebsite.get_lists().getByTitle( 'WO_Projects' );
- var camlQuery = new SP.CamlQuery();
- camlQuery.set_viewXml( '<View><Query><Where><Geq><FieldRef Name='ID'/>' +
- '<Value Type='Number'>1</Value></Geq></Where></Query></View>' );
- this.customlist = oList.getItems( camlQuery );
- clientContext.load( this.customlist );
- clientContext.executeQueryAsync(
- Function.createDelegate( this, onQuerySucceededClarityID ),
- Function.createDelegate( this, onQueryFailedClarityID ));
- }catch(err){
- erroSearchBP++;
- if( erroSearchBP < 100 ) setTimeout( function() { consultBP(); } ,200 );
- else alert( erroCarregarPagina );
- }
- }
- function onQuerySucceededClarityID(){
- //........
- }
- function onQueryFailedClarityID( sender, args ) {
- alert( "Failed" );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement