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 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 9 years, 4 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

    application solution

    Popular Salesforce Blogs

    5 Essential Tips for Successful Salesforce Migration

    Blog in Salesforce

    In today's digital landscape, businesses rely heavily on robust customer relationship management (CRM) platforms like Salesforce to manage their interactions, data, and sales pipelines. However,…

    Assessment, Business, Communication, Compliance, CRM
    William Apr 2, 2024
    580  Views

    Must-Have Tools For Start-ups | Salesforce Guide

    Blog in Salesforce, Salesforce Products

    Starting your own startup business can be a daunting experience, especially if you’re still at a delicate stage. Everything needs to be error-free, as a…

    Best Customer Experience, Best Startup Tools, Best Tools, Build Client Relationships, Business
    Apphienz May 27, 2021
    1,691  Views

    How Salesforce IoT Cloud Prove to be Beneficial for Your Business

    Blog in Salesforce Cloud Platform

    The term, Internet of Things (IoT), is a system of connected computing devices, such as mobiles, digital machines, and other objects with the potential of…

    automated process, B2B processes, Big Data, Business, Business Analytics Software
    Emizen Nov 19, 2020
    4,362  Views

    Popular Salesforce Videos

    How to Create a Jira Ticket from Salesforce?

    How to Create a Jira Ticket from Salesforce?

    Video in Salesforce Training

    Learn how to create a Jira ticket in Salesforce using two different methods and how to choose a Jira project. Know more at https://www.sinergify.com/

    Salesforce Training, Salesforce Integration, salesforce, Salesforce Video, Salesforce Learning
    Shubham May 4, 2022
    2,260  Views
    SelectList, select Option & Action Function in Salesforce Apex Language

    SelectList, select Option & Action Function in Salesforce Apex Language

    Video in Visualforce, Salesforce Apex

    If you work upon salesforce and VF Pages, you have seen these words one is rendered, reRender, ActionFunction, param, onclick, onchange, In this video, you…

    Apex APIs, Apex, Salesforce Objects, How To Learn Apex, Salesforce Apex Tutorial
    Pooja Nov 26, 2018
    2,736  Views
    How To Become A Salesforce Administrator | Salesforce Administrator Training

    How To Become A Salesforce Administrator | Salesforce Administrator Training

    Video in Salesforce Admin

    This "How to become a Salesforce Administrator" video will help you understand who is a Salesforce Administrator and what are their roles and responsibilities. It…

    Salesforce Tutorial, Salesforce Administrator Training, Salesforce Admin, Salesforce Video, Salesforce Learning
    Rupal Kakkar May 21, 2021
    1,487  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

    © 2025 - 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.