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

    Messaging in Salesforce

    Messaging in Salesforce: Ways To Send Text, WhatsApp, Viber Messages

    Blog in AppExchange, Salesforce

    The restrictions during the COVID-19 quarantine boosted the growth of digital communication. Instead of interacting face-to-face, vendors are now reaching customers through messages and emails.…

    App Components, Automate Messaging, Business Needs, Campaign Members, Chatbot Conversations
    Brimit Oct 27, 2022
    3,244  Views

    Make Your CRM Future-Ready: Migrate from Salesforce Classic to Lightning

    Blog in Salesforce

    Classic and Lightning are the two common versions of the Salesforce CRM UI. The newer Salesforce Lightning version gives clients a more natural and easy-to-use…

    App Builder, Assurance Level, Automation, Campaign Strategies, Charts
    Damco Aug 9, 2023
    1,957  Views

    Benefits of Hiring Certified Salesforce Implementation Partners

    Blog in Salesforce

    In today’s highly competitive business landscape, organizations rely heavily on CRM solutions to enhance customer engagement, streamline operations, and boost sales performance. Salesforce, being the…

    Salesforce CRM Services, Salesforce for Business Growth, Salesforce Implementation Company, Salesforce Implementation Partners, Salesforce Integration Services
    Dean Nov 25, 2025
    127  Views

    Popular Salesforce Videos

    Pros & Cons of Lightning Component vs. 3rd party frameworks in Salesforce UI development

    Pros & Cons of Lightning Component vs. 3rd party frameworks in Salesforce UI development

    Video in Lightning

    Nikita drops by to share his invaluable experience of using popular 3rd party frameworks in Salesforce. http://media.blubrry.com/salesforceway/audio.xmcdn.com/group42/M05/25/57/wKgJ81rXk6XjaZIAAU_I_KtprFM998.m4a  

    Salesforce Training Videos, Salesforce Lightning Components, How to Salesforce Lightning Component, Salesforce Video Tutorials, Salesforce Development Tutorial
    Shiv Kumar Sharma May 21, 2018
    1,979  Views
    How to Create an Object in Salesforce Lightning Experience?

    How to Create an Object in Salesforce Lightning Experience?

    Video in Lightning, Salesforce Training

    Salesforce has always emphasized on declarative development since the beginning. The motto is that enterprise software should be easy to use for customers. With “clicks…

    salesforce training videos for beginners, Salesforce Training Videos, Free Salesforce Training, Salesforce Lightning Experience, Salesforce Objects
    Shiv Kumar Sharma May 11, 2018
    5,800  Views
    How to Use Salesforce for Project Management

    How to Use Salesforce for Project Management

    Video in Salesforce Stories

    When you think of CRM software, "Salesforce" is probably one of the first words that comes to mind. But Salesforce can do so much more…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Salesforce AppExchange
    Nauman Aug 16, 2021
    2,344  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.