Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Page Validator not working in Webform

$
0
0

i m trying to put a page validator to check if there are records in the subgrid. If there is atleast one record in the subgrid it should progress to the next page otherwise it has to throw error. I have implemented a similar code ina different page and it is working fine. but for a different webform step this code isnt working. Can someone please tell me how we can debug a validator. My code is below


$(document).ready(function () {

if (typeof (Page_Validators) == 'undefined') return;
// Create new validator
var newValidator = document.createElement('span');
newValidator.style.display = "none";
newValidator.id = "SchoolPlacementvalidator";
newValidator.controltovalidate = "SchoolPlacement";
newValidator.errormessage = "<a href='#SchoolPlacement'>At least one Qualification item must be added to progress.</a>";
newValidator.evaluationfunction = function () {
var SchoolPlacement = $("#SchoolPlacement table tbody tr").length;
if (SchoolPlacement === 0) {
return false
}
else {
return true;
}

};
Page_Validators.push(newValidator);


});


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>