When we are setting up CRM Portals to allow customers to update their information, open cases, fill out an applications, etc. We want to make sure that we are validating their input before it is committed to CRM. This way we ensure that our data is clean and meaningful to us and the customer.
CRM Portals already has a lot validation checks built into it. But, on occasion we need to add our own. To do this we will use JavaScript to run the validation and also to output a message to the user to tell them there is an issue they need to fix.
Web Page:
Message JavaScript:
CRM Portals already has a lot validation checks built into it. But, on occasion we need to add our own. To do this we will use JavaScript to run the validation and also to output a message to the user to tell them there is an issue they need to fix.
Before we can do any JavaScript, we need to check and see if we are using JavaScript on an Entity Form or Web Page. This is because the JavaScript, while similar, will be different. First, we will go over the JavaScript for Entity Forms. Then, we will go over the JavaScript for Web Pages. Finally, we will look at the notification JavaScript.
Entity Form:
if (window.jQuery) {
(function ($) {
if (typeof (entityFormClientValidate) != 'undefined') {
var originalValidationFunction = entityFormClientValidate;
if (originalValidationFunction && typeof (originalValidationFunction) == "function") {
entityFormClientValidate = function ()
{
//DO VALIDATION HERE. RETURN TRUE IF PASSED AND FALSE IF FAIL
};
}
}
}(window.jQuery));
}
Web Page:
if (window.jQuery) {
(function ($) {
if (typeof (webFormClientValidate) != 'undefined') {
var originalValidationFunction = webFormClientValidate;
if (originalValidationFunction && typeof (originalValidationFunction) == "function") {
webFormClientValidate = function ()
{
//DO VALIDATION HERE. RETURN TRUE IF PASSED AND FALSE IF FAIL
};
}
}
}(window.jQuery));
}
Message JavaScript:
$('.notifications').append($("<div class='notification alert alert-danger' role='alert'>PUT ERROR MESSAGE TEXT HERE</div>"));
i dont know the exact issue but "webFormClientValidate" is not working dynamics Portal version 9.2.5.15 for me. its always undefined no matter what i do.
ReplyDeletedo you know any alternative for this. Thanks.
Nice blog has been shared by you. it will be really helpful to many peoples who are all working under the technology.thank you for sharing this blog.
ReplyDeleteHELP DESK
The worst part of it was that the software only worked intermittently and the data was not accurate. You obviously canot confront anyone about what you have discovered if the information is not right. ñustomer relationship management for google comparison
ReplyDeleteThe Essence of Physiotherapy: A Holistic Approach to Healing
ReplyDeletePhysiotherapy is a healthcare discipline that focuses on improving physical function and mobility. It's a holistic approach that emphasizes the interconnectedness of the body and mind, recognizing that optimal health requires harmony between these elements. Physiotherapists are highly trained professionals who use evidence-based techniques to diagnose, treat, and prevent a wide range of musculoskeletal and neurological conditions.
osteopathy physiotherapy