Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Marketplace
    • Advertise With Us
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How Can I Insert, Update the Account Records from Salesforce Vf page using Remote actions?

    Tagged: Account Record, Javascript Remoting, Remote Action, Salesforce Visualforce Page

    • Salesforce® Discussions

      How Can I Insert, Update the Account Records from Salesforce Vf page using Remote actions?

      Posted by Manu on December 13, 2018 at 2:20 PM

      How Can I Insert, Update the Account Records(using custom controller class) from Vf page using Remote actions?

      Thanks in advance

      Jade replied 7 years ago 2 Members · 1 Reply
      • Account Record
      • Javascript Remoting
      • Remote Action
      • Salesforce Visualforce Page
    • 1 Reply
    • Jade

      Member
      January 11, 2019 at 7:48 AM

      Hi Mallesh,

      Definitely you can Update and Insert Account or any object Record using JavaScript Remoting.

      check the below code:

      //This is a javaScript Remoting function, you can use it to update/Insert Account
      <script type="text/javascript">
      function getRemoteAccount() {
          var account = {!accRec}; //Initialize an account in your controller like, Account accRec{get;set;}
          //Then set the values of this from your page
          Visualforce.remoting.Manager.invokeAction(
              '{!$RemoteAction.MyController.updateAccount}', 
              accRec, 
              function(result, event){
                  if (event.status) {
                      //Even account get updated, you will get the values in "result"
                  } else if (event.type === 'exception') {
                      document.getElementById("responseErrors").innerHTML = event.message;
                  } else {
                      document.getElementById("responseErrors").innerHTML = event.message;
                  }
              }, 
              {escape: true}
          );
      }
      </script>
      
      Apex:
      
      In apex you can have this method.
      
      @RemoteAction
      Public Static void updateAccount(Account acc){
          if(acc != null){
             try{
                 update acc;
             }catch(DMLException de){
                 System.debug('DML Exception');
             }
          }
      }
      
      Hope this will be helpful!!!
      
      Thanks

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    application solution

    Popular Salesforce Blogs

    Salesforce Einstein Vision: How it works?

    Salesforce Einstein Vision: How it works?

    Blog in AI and ML

    Before starting about this, Please give few minutes to this article What is AI and Machine Learning? If you have done with above blog. Let’s cover Salesforce…

    Machine Learning, Salesforce Einstein
    0to1Code.Com Aug 25, 2017
    7,065  Views

    9 Reasons Why Sales Teams Struggle With Sales Results | Salesforce Guide

    Blog in Sales, Salesforce

    Sales. Yes, it is a tough job. One bad month and there are hundreds of questions to answer. No matter what the market reality is…

    Automated Solution, Campaign, Communicating, data, Deliver Messages
    LevelShift (formerly DemandBlue) Jul 28, 2021
    3,172  Views
    Better Salesforce

    The IT Leader's Guide to a Better Salesforce: An Introduction

    Blog in Salesforce Consultant

    Salesforce is fantastic. Sure, it has quirks. Yes, some people complain about it…but when you consider its power…an out of the box fully functioning CRM…

    Business Application, Businesses Acquire, Businesses Change, Businesses Divest, Businesses Merge
    Virtesio Jun 2, 2022
    2,384  Views

    Popular Salesforce Videos

    How to Take Your Salesforce Support Model to the Next Level

    How to Take Your Salesforce Support Model to the Next Level

    Video in Salesforce Stories

    Jeremy Muldoon, the Salesforce expert at Rimini Street, discusses the Salesforce resource challenges faced by businesses today, how to overcome them, and how to take…

    Salesforce Training, Salesforce Tutorial, salesforce, salesforce platform, Salesforce Video
    Nauman Feb 11, 2022
    1,786  Views
    The Salesforce and Stripe Integration Solution

    The Salesforce and Stripe Integration Solution

    Video in Salesforce Integration

    Salesforce professionals choose us because we’re different. Our intuitive software connects Salesforce with Stripe and is simple to set up and configure and safe and…

    Salesforce Training, Salesforce Tutorial, Salesforce Integration, salesforce, Salesforce Video
    Algoworks Jul 28, 2021
    1,484  Views
    Salesforce Interview Questions and Answers - For Freshers and Experienced Candidates

    Salesforce Interview Questions and Answers - For Freshers and Experienced Candidates

    Video in Salesforce Stories, Salesforce Training

    Learn most important Salesforce Interview Questions and Answers, asked at every interview. These Interview questions will be useful to all entry-level candidates, beginners, interns, and…

    Salesforce Developers, Salesforce Training Video, Salesforce Interview Questions, Interview Questions and Answers, Salesforce Interview Questions and Answers
    Neha Yadav Jun 2, 2020
    1,830  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.