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

    Salesforce Classic Vs Salesforce Lightning

    Salesforce Classic Vs Salesforce Lightning: Which One is More Suitable?

    Blog in Lightning, Salesforce

    When someone talks about Customer Relationship Management Software, Salesforce is never left behind! Be it ease-of-use, app marketplace, or customizability; everything about Salesforce Platforms is…

    App Development Resource, App Marketplace, Application Execution, Business, Business Logic
    SP Aug 18, 2021
    2,841  Views

    No Code ScheduleOnce and Salesforce Integration

    Blog in Salesforce integration

    ScheduleOnce is a cloud-based scheduling service that enables businesses of all sizes to schedule and manage user engagement with their users and prospects. Users can…

    API requests, API User, Booking Data, Cloud-based Scheduling Service, CRM
    Apphienz Apr 26, 2022
    2,390  Views

    All You Need to Know About Apex Programming

    Blog in Salesforce Apex

    Apex Programming Apex is the object-oriented programming language used by the Salesforce platform. It enables developers to execute transactions and control statements on servers associated…

    Apex Programming, Application Maintenance, Applications, Authentication, Authorization
    Arpit Jun 2, 2023
    2,175  Views

    Popular Salesforce Videos

    The Story of Salesforce. How Marc Benioff Built The Best CRM

    The Story of Salesforce. How Marc Benioff Built The Best CRM

    Video in Salesforce Stories

    This video, How It Happened explains the story of how Salesforce went from a small startup in San Francisco to become the leading CRM provider.…

    Salesforce Training, Salesforce Tutorial, salesforce, CRM, salesforce services
    Mayra Sep 9, 2022
    2,057  Views
    Unleash the Power of Compare Tables | Salesforce Video

    Unleash the Power of Compare Tables | Salesforce Video

    Video in Others, Salesforce Products

    In this video, you will learn how to use compare tables to calculate complex calculations quickly, which you can then use to visualize your data.…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Compare Tables
    Pooja Jun 19, 2020
    2,165  Views
    Tracking Member Engagement with Scoring and Dashboards

    Tracking Member Engagement with Scoring and Dashboards

    Video in Analytics

    More than half of organizations with a member engagement plan reported that it helped them increase: Membership renewals by 51%. Attendance at events and webinars…

    Salesforce Tutorial, salesforce, Salesforce Video, Digital Engagement, dashboards
    Aplusify Jun 24, 2024
    637  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.