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 we cancel or save account field in the account object in Salesforce org by javascript?

    Tagged: Account, Javascript, Salesforce Org

    • Salesforce® Discussions

      How can we cancel or save account field in the account object in Salesforce org by javascript?

      Posted by Mohit on July 19, 2016 at 3:49 PM

      Hi all,

      How can we cancel or save account field in the account object in salesforce org by javascript?

      If we ask the user that user want to insert account field on the account or cancel the insertion of account field on an account by the help of Javascript. By using Javascript confirm function that user wants to insert the account detail or want to cancel the insertion of account details.

      Please give your suggestions.

      Prakhar replied 10 years, 2 months ago 2 Members · 1 Reply
      • Account
      • Javascript
      • Salesforce Org
    • 1 Reply
    • Prakhar

      Member
      July 20, 2016 at 11:19 AM

      Hii Pranav,

      You can do DML operation with the help of Javascript by using sforce.connection.

      Here is an simple example to insert the record in account object in salesforce:-

      var account = new sforce.SObject('Account');

      // Provide the required fields for the account to insert and other fields that you want.

      account.Name = 'Test';

      // Here you can provide your condition for the insertion or cancel the record.

      if(account.Phone != ' ' && account.Phone != Null){
      var results = sforce.connection.create([account]);

      }

      else{

      //Show some error .

      }

      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

    The Journey Of Salesforce - Walking Down The Memory Lane

    Blog in Salesforce

    Salesforce is the most popular CRM, connecting businesses and customers in the digital age. Salesforce, which was founded in 1999, enables businesses of all sizes…

    App Developers, AppExchange App, AppExchange Community, AppExchange Ecosystem, AppExchange Mobile App
    Apphienz Nov 10, 2021
    2,519  Views
    formula and validation

    Formula Field and Validation Rule in Salesforce

    Blog in Salesforce

    Formula and validation: “Control of how your data is displayed.” These rules confirm that the information a client enters in a record meets the benchmarks…

    Calculations, Content, Dat Value, Formula and Validation, Formula Fields
    Ayush Apr 7, 2020
    15,865  Views

    How to Solve Employee Productivity Issues by Optimizing Salesforce for Your Team

    Blog in Others

    In 2026, companies using CRM systems report that improving user adoption directly increases productivity by 25% or more. Studies show that 58% of sales teams…

    William Feb 4, 2026
    852  Views

    Popular Salesforce Videos

    Security Best Practices for Building Lightning Components

    Security Best Practices for Building Lightning Components

    Video in Salesforce Security, Lightning

    Lightning Component is a framework to build Salesforce applications faster. If you are using Salesforce1, you already experiencing the Lightning. It is based on an…

    Salesforce Visualforce, Salesforce Security, Salesforce Lightning, Salesforce Trailhead, Security And Access
    Abhay May 5, 2018
    2,277  Views
    Salesforce Admin Interview Questions And Answers For Freshers & Experienced

    Salesforce Admin Interview Questions And Answers For Freshers & Experienced

    Video in Salesforce Training, Salesforce Admin

    This Salesforce Admin Interview Questions and Answers video includes all the frequently asked Interview questions that give you an idea to crack your Salesforce Admin…

    Salesforce1, Cloud Computing, Salesforce Admin, Salesforce VIdeos, Salesforce Learning
    Nauman May 11, 2021
    2,655  Views
    Real-time Scenario: Custom Rollup Summaries Using Triggers | Salesforce Tutorial

    Real-time Scenario: Custom Rollup Summaries Using Triggers | Salesforce Tutorial

    Video in Salesforce Apex

    Watch this video to learn all about Custom Rollup Summaries Using Triggers using the real-time scenarios. If you have any doubts or concerns do let…

    Salesforce Training, Salesforce Tutorial, Salesforce Apex, Salesforce Triggers, salesforce
    Rupal Kakkar Jul 8, 2022
    3,107  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.