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 Benefits of Salesforce Sales Cloud for your Business The Ultimate Guide

    The Benefits of Salesforce Sales Cloud for your Business | The Ultimate Guide

    Blog in Salesforce Consultant

    In today’s competitive business environment, customer satisfaction and retention are key factors in achieving success. This is where Salesforce Sales Cloud comes into play. It is a…

    Customer Experience, Customer Experiences, Customer Journeys, Customer Loyalty, marketing cloud and sales cloud integration
    Innovadel Mar 27, 2023
    1,565  Views
    Salesforce APIs

    What are Salesforce APIs - A Brief Guide

    Blog in Salesforce Admin

    As a Salesforce Administrator you’ve probably heard the term ‘Salesforce APIs’ many times and you know that they’re something to do with programming but have…

    API, Application Programming Interface, Batch of Data, Bulk API, Data Manipulation Language
    Stimulus Consulting Dec 16, 2022
    2,645  Views
    insert record in salesforce

    Insert Record by Email Service Attachments in Salesforce

    Blog in Others, Salesforce, Salesforce Apex

    Email Service Email service is the process that fulfills the business requirement by automated process service by using apex classes to process the content, attachment,…

    Attached CSV Files, Attachment, Attachments in Salesforce, Automated Process Service, Business Requirement
    Aditya Aug 7, 2020
    11,766  Views

    Popular Salesforce Videos

    Introducing Salesforce Experience Cloud LWR Sites | Lightning Web Runtime

    Introducing Salesforce Experience Cloud LWR Sites | Lightning Web Runtime

    Video in Salesforce Cloud Platform, Salesforce Training

    In the first episode of this series, we'll walk you through what the Build-Your-Own (BYO) LWR template is. Based on our new sample app "AZ…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, Salesforce Learning, Salesforce Experience Cloud
    Prafull Jun 30, 2021
    5,344  Views
    What are Permission Sets (Object Level Security) in Salesforce?

    What are Permission Sets (Object Level Security) in Salesforce?

    Video in Salesforce Security, Salesforce Training

    In this video, Shrey is not only teaching but also demonstrating Permission Sets used in Salesforce Object Level Security. You will be learning: What are…

    Salesforce Training, Salesforce Tutorial, Salesforce Administrator, salesforce, Salesforce Video
    Abhishek Dec 11, 2020
    2,595  Views
    What Is Loyalty Management in Salesforce? | Video Tutorial

    What Is Loyalty Management in Salesforce? | Video Tutorial

    Video in Salesforce Training

    In the past few years, we have come across terms such as loyalty programs and loyalty management. Let's understand the concept of loyalty management with…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Customer Relationship Management
    Cyntexa Dec 12, 2022
    1,536  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.