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

    Build Your First Blockchain with Salesforce Apex

    Build Your First Blockchain with Salesforce Apex

    Blog in Others

    Introduction of Blockchain According to Wikipedia "A blockchain, originally blockchain is a growing list of records, called blocks, which are linked using cryptography." Blockchain was…

    Bitcoin, Block, Blockchain, Crypto, Crypto Class
    0to1Code.Com Aug 29, 2018
    7,488  Views
    Salesforce Custom Objects

    More About Salesforce Custom Objects Behavior

    Blog in Salesforce

    Utilize the accompanying points to work out how the API communicates with custom items and fields: Naming Conventions for Custom Objects Relationships Among Custom Objects…

    API, API Communicates, API Names, Audit Fields, Contact Object
    MOHIT Dec 16, 2020
    3,899  Views

    The Top 10 Marketing Cloud Hacks You Should Know

    Blog in Salesforce

    Even if you are an expert in the Salesforce Marketing Cloud, it never hurts to have a few tricks under your sleeve. You will continue…

    App Downloads, Audience Segmentation, Contact Builder, Customer Data, Customer Relationship Management
    Eden Jun 15, 2023
    1,414  Views

    Popular Salesforce Videos

    Field Level Security In Salesforce

    Field Level Security In Salesforce

    Video in Salesforce Security

    Field-level security is a setting that lets Salesforce admins define user restrictions as to who can access specific org data. The setting lets the admin…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Admins, Salesforce Video
    Jogender Dec 24, 2020
    1,700  Views
    Introduction to Set & Map in Salesforce || What is Set || What is Map ||

    Introduction to Set & Map in Salesforce || What is Set || What is Map ||

    Video in Others

    From Salesforce instructor, Become a Salesforce Expert. A brief introduction about what is a Set, map, and what are their importance? Check out the video to…

    Salesforce Expert, Set, Salesforce Map, Map
    Neha Yadav Oct 21, 2019
    2,132  Views
    Good Time To Buy Salesforce Stock? CRM Stock Analysis

    Good Time To Buy Salesforce Stock? CRM Stock Analysis

    Video in Others, Salesforce Stories

    CRM stock price is currently all over after reporting its SALESFORCE earnings report. I am considering if I should buy CRM Stock. This is a…

    salesforce knowledge, Salesforce Learning, Salesforce Stock, Salesforce Earnings Report, CRM Stock Analysis
    Neha Yadav Sep 2, 2020
    2,033  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.