web
You’re offline. This is a read only version of the page.
close
Skip to main content
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

I have the same question (0)
  • rthompson Profile Picture
    1,532 on at
    RE: How to run jquery in any of the crm form

    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,562 on at
    RE: How to run jquery in any of the crm form

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
UllrSki Profile Picture

UllrSki 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans