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)

How to run jquery in any of the crm form

(0) ShareShare
ReportReport
Posted on by 111

Hi,

I'm new to Jquery, I want to retrieve some values on click of save button.

code goes like this. 
<script type="text/javascript"> 
 
        $(document).ready( function() {
           
            
            $('#btnTesting_Click').click(function () {
                event.preventDefault();
               
                var customerData = {
                    "Id": ,
                    "Code": " ",
                    "Name": " ",
                    "ShortName": " ",
                    "Type": " ",
                    "Address1": " ",............
 

How do i call this when the record gets saved.

I'm using this for WCF services.

 

Please Help.

Thank you.

*This post is locked for comments

  • rthompson Profile Picture
    1,532 on at

    Hi Amos,

    To get a basic start on please look at Xrm.Page object model.

    Review this link.

    It's a good start.

    docs.microsoft.com/.../clientapi-form-context

  • Suggested answer
    jlattimer Profile Picture
    24,564 on at

    If you are talking to a WCF service you would be much better off writing a plug-in that executes when that entity is updated instead. 

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/write-plugin-extend-business-processes

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans