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, 2 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

    application solution

    Popular Salesforce Blogs

    Most Essentials Tools for Building Salesforce Lightning Components

    Blog in Lightning

    Any Salesforce developer who wants to be at the top of his game should know how to work well with Lightning Components. With Lightning Components,…

    Aura Components, Building Lightning Components, Code Reusability, Components, CSS
    360 Degree Mar 7, 2022
    2,728  Views
    What is Salesforce?

    What is Salesforce?

    Blog in Salesforce Products, Salesforce Tools

    What is Salesforce? Salesforce is a cloud-based Customer Relationship Management (CRM) software that makes solutions available for sales, service, marketing, collaboration, analytics, and building custom…

    Cloud Computing Salesforce, Force.com Platform Apex Limits, Miscellaneous Apex Limits, Per-Transaction Apex Limits, Per-Transaction Certified Managed Package Limits
    Archit Feb 16, 2018
    15,917  Views

    Integrate .NET console application with Salesforce Rest API

    Blog in Salesforce integration

    According to the integration perspective in Salesforce there are several APIs to integrate with external systems. As an example there are REST API, SOAP API,…

    API Name, Bulk API, Console Application, JSON, OAuth
    Prasad Nov 16, 2018
    31,809  Views

    Popular Salesforce Videos

    Salesforce Developer Tools and Productivity

    Salesforce Developer Tools and Productivity

    Video in Salesforce Products

    Kevin Poorman shows how you can use Salesforce Developer Tools and how you can unlock developer productivity. Watch this video to learn more.

    Salesforce Products, salesforce, Salesforce Tools, Salesforce Developers, Salesforce Video
    Jogender Apr 13, 2021
    2,694  Views
    Volunteer Management in Salesforce Nonprofit Cloud

    Volunteer Management in Salesforce Nonprofit Cloud

    Video in Salesforce Cloud Platform

    Volunteers are a crucial part of many nonprofit organizations. With Volunteer Management in Nonprofit Cloud, you can improve every step of the volunteer process from…

    salesforce, CRM, Digital Transformation, Nonprofit, Nonprofit Cloud
    DB Nov 25, 2025
    70  Views
    Salesforce Winter 18 Release for Busy Admins

    Salesforce Winter 18 Release for Busy Admins

    Video in Marketing

    Contents: Lightning Report Builder Dashboard Report Filter Lightning Hover Components Conditional Page Components Setup Search in Lightning Lead Conversion Updates User Interface Settings

    Salesforce Administration, Salesforce Admin Training, Salesforce Lightning, Salesforce Lightning Experience, Salesforce Lightning Components
    Shiv Kumar Sharma Feb 9, 2018
    1,852  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.