function AddPotentialtopic(){
debugger;
$pnp.sp.web.lists.getByTitle("WOW").items.add({
DocType:_documentTypes,
PotentialTopic:_policyDocument,
TopicEnteredDate:_dateTopicEntered,
PotDocType:_potentialDocumentType,
PotentialtopicCreatedby:_potentialTopicCreatedBy,
PotTopicRdyForDev:_potentialTopicReadyforDevelopment
}).then(results=>{
alert("Your Data has been saved sucessfully");
console.log(results);
window.location.href="/sites/MP/SitePages/Report.aspx";
});
}
After executing this code its coming inside the Addpotential topic function and execute the pnp add item function but finally its not adding the data and not coming inside the results section.
No error in console too. Could you please tell me what could be the issue.
This is not SPFx. I put the custom page in share point and executing this code.
$("#btnPotentialTopic").click(function(){ debugger; _documentTypes=$('input:radio[name=radio-group]:checked').parent().find('label').text(); _policyDocument=$('input:radio[name=radio-groupPolicy]:checked').parent().find('label').text(); _dateTopicEntered=$("#Date-Topic-Entered").val(); _potentialDocumentType=$("#PotentialDocType :selected").text(); _potentialTopicCreatedBy=$("#Potentialtopiccreatedby :selected").text(); _potentialTopicReadyforDevelopment=$('input:radio[name=radio-groupPolicyDevelopment]:checked').parent().find('label').text(); AddPotentialtopic(); });
function AddPotentialtopic(){ debugger; $pnp.sp.web.lists.getByTitle("WOW").items.add({ DocType:_documentTypes, PotentialTopic:_policyDocument, TopicEnteredDate:_dateTopicEntered, PotDocType:_potentialDocumentType, PotentialtopicCreatedby:_potentialTopicCreatedBy, PotTopicRdyForDev:_potentialTopicReadyforDevelopment
}).then(results=>{ alert("Your Data has been saved sucessfully"); console.log(results); window.location.href="/sites/MP/SitePages/Report.aspx"; });
}
After executing this code its coming inside the Addpotential topic function and execute the pnp add item function but finally its not adding the data and not coming inside the results section.
No error in console too. Could you please tell me what could be the issue.
This is not SPFx. I put the custom page in share point and executing this code.