Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I am currently using custom validation on Dynamics CRM portal using Page_Validators on Web Form Step
I noticed that the evaluationfunction is actually called TWICE every time I click Next/Submit
I put a simple alert(‘hello’); command inside the evaluationfunction and I can see the prompt twice.
Anybody has idea if this is by design or there’s something I did wrong?
What would be the best way to check if the evaluationfunction is already called so we are not doing twice the work inside the function.
I can confirm that it indeed does get called twice - nothing you've done wrong.
It gets called once explicitly by the Portal code when you click on the submit button, and then again as part of the regular process of the form submission.
If you don't want to do the work twice, you'd have to come up with some sort of caching mechanism. You might be able to count how many times it's been called, and only perform the work every second time, but I'm not sure if there are any cases where it won't get called twice. I'd recommend storing the result in a variable, and having your evaluation function use that variable if it is not null, and then adding another event handler to the submit click event that clears the variable. That should ensure you're only doing the calculation once per submit button click.
Hope that helps.
Thank you for this. I ended up using webFormClientValidate which only gets called once.
Business Applications communities