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, 1 month 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

    Introduction of Leaflet Map in Salesforce Lightning Component

    Blog in Lightning

    The Leaflet is an open-source JavaScript library that is used for mobile-friendly interactive maps. It has all the mapping features. It works very well across…

    Event, JavaScript, JS Controller, Leaflet, Lightning Application
    Satyakam Jan 19, 2018
    23,952  Views
    Salesforce Developer

    5 Reasons For Students To Become A Salesforce Developer

    Blog in Salesforce

    Salesforce CRM technologies have been an integral part of the world for quite a while now with more and more people coming to work in…

    Average Salary, Become a Salesforce Developer, Better Specialist, Business Owners, Businesses
    Frank Hamilton Apr 9, 2021
    7,206  Views

    How to Improve Revenue with CPQ Software in 2023? | Salesforce CPQ

    Blog in Salesforce Products

    Creating sales is not a simple task. To develop familiarity and interest in a product, the sales team must exert additional effort in creating persuasive…

    Approval Process, Artificial Intelligence, Artificial Intelligence Application, Business Operation, Cales Cycles
    Sculptor CPQ Feb 1, 2023
    1,622  Views

    Popular Salesforce Videos

    Simplified Non-Functional Testing for Salesforce Developers

    Simplified Non-Functional Testing for Salesforce Developers

    Video in Salesforce Training

    Testing is indispensable to measure, optimize performance, and improve user experience. Watch this video to see how you can measure performance across physical mobile devices…

    Salesforce Training, Salesforce Tutorial, Salesforce Integration, salesforce, User Experience
    Pooja Oct 26, 2021
    1,964  Views
    How to Create an Automated File Import in Salesforce Marketing Cloud

    How to Create an Automated File Import in Salesforce Marketing Cloud

    Video in Marketing, Salesforce Training

    Cameron Robert shows how to create an automation to import files from your FTP into Data Extensions in Salesforce Marketing Cloud. File Import Automations are…

    Salesforce Training, Salesforce Marketing Cloud, Salesforce Video, Salesforce Learning, Training
    Cameron Sep 17, 2021
    3,237  Views
    Salesforce Platform Quick Tip: How to Make Key Information Easier to Find

    Salesforce Platform Quick Tip: How to Make Key Information Easier to Find

    Video in Salesforce Training

    Want to flag things on a Salesforce record, so that your users notice? Like flagging a super important customer record, or alerting them that a…

    Salesforce Training, Salesforce Tutorial, salesforce, salesforce platform, Salesforce Video
    Pooja Sep 29, 2021
    1,743  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.