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

    Are you kick starting your career in Salesforce? Here are the Alpha and Beta!

    Blog in Salesforce Career

    If you're planning to start a career in Salesforce and wondering how to set a clear progressive strategy, then proceed further reading my very vague…

    Career in Salesforce, Developer Community, Salesforce Blog, Salesforce Chatter, Salesforce Cloud Platform
    Guha Dec 31, 2018
    3,779  Views
    salesforce managed packages

    Resolution of Managed Packages - Salesforce DX Developer Guide

    Blog in Others

    Working with Salesforce DX for the resolution of managed packages: First, we create an org and enable the DX version in it that is DEVHUB.…

    App Launcher, Developer Edition, Developer Org, Domain Name, DX Tools
    Anuj Jun 11, 2020
    6,379  Views

    The All New Salesforce Sales Cloud to Help You Progress in a Digital-First World

    Blog in Sales

    Today Salesforce has announced the next generation of Sales Cloud, which is designed for a socially distant, digital-first world. This covers seven new features, some…

    Automated Action, Brand New Features, Businesses Grow, Code, Competitor Analysis
    Apphienz Apr 9, 2021
    2,226  Views

    Popular Salesforce Videos

    Do you need to learn Salesforce Admin & App Builder if you want to become Salesforce developer ?

    Do you need to learn Salesforce Admin & App Builder if you want to become Salesforce developer ?

    Video in Salesforce Admin

    5 reasons why you need to learn the Salesforce Admin and App Builder even if you want to become or you are a Salesforce Developer.…

    Salesforce Certification, Salesforce Administrator Training, Salesforce Developer, Salesforce Consultant, Easy Way To Learn Salesforce
    Prafull Feb 25, 2019
    2,033  Views
    What is Salesforce Hyperforce?

    What is Salesforce Hyperforce?

    Video in Salesforce Products

    In this video, you will take a look at Salesforce Hyperforce, Salesforce's new re-architecting of the Salesforce platform. 00:00 Introduction 00:28 What is Salesforce Hyperforce?…

    Salesforce Training, dreamforce, salesforce, salesforce platform, Salesforce Org
    Pooja Jun 9, 2021
    2,613  Views
    ChargeOn Payment Processing For Salesforce: Enhance Your Salesforce Payments

    ChargeOn Payment Processing For Salesforce: Enhance Your Salesforce Payments

    Video in Others

    Do you wish to receive payments in Salesforce but are unsure how to get started? Don’t worry; we've got you covered. ChargeOn is a fully…

    ChargeOn, Salesforce Payment Processing, Salesforce Payment Gateway, Salesforce Payment Processor, Salesforce Payment Gateway Integration
    Cyntexa Sep 5, 2025
    77  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.