Updating a record from JavaScript using the Xrm.WebAPi in Dynamics 365 V9

Summary : Updating a record from JavaScript using the Xrm.WebAPi in Dynamics 365 V9


Now let’s update a record
Syntax: Xrm.WebApi.updateRecord(entityLogicalName, id, data).then(successCallback, errorCallback);

***Code starts here***

var entityData =
                {
                    "subject": “leadFromWebApi_Updated”,
                    "lastname": “RamLaxman”
                }

Xrm.WebApi.createRecord("lead", id, entityData).then(
                    function success(result)
                    {
                        alert("Record updated successfully ");                      
                    },
                    function (error)
                    {
                        console.log(error.message);       
                    });
***Code ends here***

5 comments:

  1. Looking great article with useful content, thanks for posting please do keep updating...
    Best Online Software Training Institute | HTML JavaScript Training

    ReplyDelete
  2. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time.

    CEH Training In Hyderbad

    ReplyDelete
  3. Thanks for such informative content, it's really useful.
    Best Online Training Institute

    ReplyDelete
  4. I like it so much this article and its very interesting to search and learn and gain more and more knowledge in this blog.Amazing article introducing for us .Thank you
    Software Testing Training in Chennai | Software Testing Training in Anna Nagar | Software Testing Training in OMR | Software Testing Training in Porur | Software Testing Training in Tambaram | Software Testing Training in Velachery

    ReplyDelete

Popular Posts