Toggle Side Panel

  • Blogs
  • 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
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • 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
    • 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, 9 months 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

    Popular Salesforce Blogs

    Apex Classes

    Deleting Apex Classes / Apex Triggers From Production Using Workbench | Salesforce Tutorial

    Blog in Salesforce Apex, Salesforce Training

    This is a rare scenario that we might face when not using any IDE or Source Control as part of the Salesforce Development. In order…

    Apex Triggers, Check Only, Compressed Folder, Deleting Apex Classes, Deployment
    Sharath Chandra Jul 13, 2021
    13,122  Views
    Salesforce ISV

    What Must ISVs Know Before Integrating With Salesforce?

    Blog in Salesforce integration

    A lot of enterprises depend on Salesforce for many of their business processes ranging from marketing automation to sales process management. They don’t’ all use…

    API Callouts, API Integrations, App Integration, Applications, Business Processes
    Algoworks May 18, 2020
    2,475  Views

    Top Tools and Streamlining Government Services with Public Sector Cloud

    Blog in Salesforce

    The march of technology has dramatically changed how government services are delivered, with ever more efficiency and accessibility. One of the most influential innovations driving…

    Cloud Computing, CRM, Field Service Management, Salesforce Implementation, Salesforce Public Cloud
    TechForce Jul 30, 2024
    926  Views

    Popular Salesforce Videos

    Salesforce Platform Quick Tip: How to Access Popular Items in a Single Click

    Salesforce Platform Quick Tip: How to Access Popular Items in a Single Click

    Video in Salesforce Stories

    Want to get to the things you use most with fewer clicks? Trailblazer and Senior Salesforce Developer, Ellie Matthewman shows us how to use favourites…

    Salesforce Tutorial, Salesforce Developer, salesforce, salesforce platform, Salesforce Video
    Jogender Oct 20, 2021
    2,180  Views
    Salesforce Certification Registration, Check and Verify Certification Status, Trailblazer.me Profile

    Salesforce Certification Registration, Check and Verify Certification Status, Trailblazer.me Profile

    Video in Salesforce Certifications

    All About Salesforce Certification:- Schedule your Salesforce Certification Exam Link Your Salesforce Certifications to Your Trailblazer.me Profile Check & Verify Your Salesforce Certification & Maintenance…

    Salesforce Training, Salesforce Tutorial, Salesforce Certification, Salesforce Video, salesforce certification exam
    Jogender Apr 22, 2021
    2,479  Views
    Installation & Configuration Process of Salesforce 9Calendar

    Installation & Configuration Process of Salesforce 9Calendar

    Video in Salesforce Apps

    This video demonstrates the installation, configuration, and working of our latest Salesforce app 9Calendar. Watch this video till the end to understand its functionalities. Adding…

    Salesforce Tutorial, salesforce, Salesforce Video, App, Trailblazer Community
    Tech9logy Sep 5, 2025
    270  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®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.