Sunday, 17 March 2019

SPList fields using pnp

private GetSPListFields():void
{
pnp.sp.web.lists.getByTitle("Employee").fields.get().then(function(response){

for(let index:number=0;index<response.length;index++)
{
//Show title
console.log("InternalName :"+response[index].InternalName+" StaticName:"+response[index].StaticName+" Title:"+response[index].Title);
}

}).catch(function(exception){
alert("Something went wrong :"+exception);
});
}

No comments:

Post a Comment