web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

stop save operation on portals form

(0) ShareShare
ReportReport
Posted on by

Hi ,

I need to save operation on ms crm portals so below code written but while clicking on ok it is saving automatically

could you please advice any wrong with my code.

$(document).ready(function () {
$('#NextButton').on('click', function (e) {
debugger;
var supporter = $('#crm_nameofcontact').val();
if (supporter != null && supporter != "") { }
else

alert("Name of  contact field is manadatory");
e.preventDefault();

}

})
});

Thanks,

Naresh

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi Naresh,

    Instead of this you should use client-side validation to implement this requirement, refer

    docs.microsoft.com/.../add-custom-javascript

  • Verified answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Naresh,

    See: docs.microsoft.com/.../add-custom-javascript

    Hope this helps.

  • Suggested answer
    sandeepstw Profile Picture
    4,601 on at

    Hi,

    You can use js validation to stop saving on portal.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans