• Who We Are
    • About Us
    • Factor - D
    • Our Networks
    • Accolades
  • What We Do

    SERVICES

    • Consulting / Implementation
    • Migration
    • Development

    OUR SOLUTIONS

    • GUMU Integration
    • BPortaly
    • Sales Commission
    • Shipping
    • IOT

    COMPREHENSIVE SERVICES FOR

    ERP

    • Acumatica
    • Sage Intacct
    • Sage X3
    • Sage 300
    • Sage 100
    • Sage 500

    CRM

    • Salesforce
    • D365 CRM
    • Sage CRM
    • Creatio
    •  

    Other Solutions

    • E-commerce
    • EDI
    • POS
    •  
    •  
  • Resources
    • Case Study
    • Blogs
    • Videos
    • Ebooks
    • News
  • +1 888 221 6661
Contact us
Career |
  • Africa
  • Middle East

Salesforce.com - Tips, Tricks and Components

Welcome to the treasure trove of Greytrix’s Salesforce knowledge. This page is dedicated to providing you with insightful articles, expert tips, and the latest updates on Salesforce CRM. Whether you want to enhance your Salesforce experience or want to stay updated on industry trends, our blog has you covered. In addition, we also offer cutting-edge solutions for Salesforce and are committed to delivering unparalleled support and innovation for Salesforce users. Explore and enhance your Salesforce experience with Greytrix.

Calling SOQL Query from JavaScript for validation of Account Name in Salesforce

By greysalesforce | June 5, 2013
0 Comment

Recently, we had a requirement from one of our clients, wherein they wanted a page where user had to enter the Account Name. We were required to validate that account name and then do further processing.

In below code snippets, we are checking if the Account name entered by the user is valid by querying on Account table/object directly in the JavaScript code. To simplify the code, we have used the variable AccountName in JavaScript to specify the account name.
———————————————————————-<snip>
<apex:page >
<script language=”JavaScript1.2″ src=”/js/functions.js”></script>
<script src=”/soap/ajax/9.0/connection.js” type=”text/javascript”></script>
<script id=”clientEventHandlersJS” language=”javascript”>
function CallSOQL()
{
sforce.connection.sessionId = ‘{!$Api.Session_ID}’;
try
{
alert(‘Select Name, Id From Account ORDER BY Name’);
var AccountName=” TEST ACCOUNT”;
var qr = sforce.connection.query(“SELECT id,name FROM Account where Name='”+ AccountName +”‘”);
var records = qr.getArray(“records”);
alert(‘qr ‘+qr);
}
catch (error)
{
alert(error.faultstring);
}

if (qr.size == 0)
{
alert(“No Record found.”);
}
else
{
for (var i=0;i<qr.records.length;i++)
{
alert(qr.records[i].Name);
}

}

}
</script>

<input type=”button” onclick=”CallSOQL();” value=”Call SOQL Query”/></apex:page>

———————————————————————-<snip>

By using the above given code, you can query on any object or custom object of Salesforce without writing code on controller side.

Greytrix offers GUMU™ for Salesforce – Sage 300 (Accpac) Integration a best of breed solution for organizations to enhance their customer interaction.

About Us
Greytrix as a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners across the globe. We offers Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that requires apex code incorporation into the Salesforce platform.

Greytrix has some unique solutions for Cloud CRM such as Salesforce integration with Sage Enterprise Management (Sage X3), Sage Intacct, Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data Migration, Integrated App development, Custom App development and Technical Support to business partners and end users.

Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star app listed on Salesforce AppExchange.

For more information, please contact us at salesforce@greytrix.com. We will be glad to assist you.

Category: GUMU™ Salesforce Tags: Account Name, Custom Object, JavaScript, Query, Salesforce Integration, Salesforce Integration with Sage 300 ERP, Salesforce integration with Sage X3, SOQL Query
Post navigation
Assign custom object permissions to Standard User in Salesforce →

Greytrix Websites and Blogs

  • Greytrix
  • GUMU™ Cloud
  • Greytrix Africa
  • Sage X3 – Tips, Tricks and Components
  • Sage 100 & 500 ERP Tips and Tricks
  • Sage 300 – Tips, Tricks and Components
  • Sage CRM – Tips, Tricks and Components

GUMU™ Salesforce Sage Integration

https://www.youtube.com/watch?v=X9Dg4uwGT-0

Categories

  • GUMU™ Features
  • GUMU™ Salesforce
  • GUMU™ Tricks & Tips
  • Salesforce Services
  • Uncategorized
sage enterprise management services

Recent Posts

  • Is Your Salesforce Built For The New Era Of Financial Services?
  • Streamlining Order Promotion in Salesforce: GUMU™ Now Supports Direct Promotion from Standard Order Page
  • View Sage 100 Customer Statistics in Salesforce with GUMU™ Lightning Integration
  • GUMU™ Feature: Improved Security Tree View with Smart Text Search
  • The AI Advantage: How Financial Institutions are Winning Big with Salesforce CRM

Popular blogs

  • Thinking of enhancing your business processes? Get the best ERP – CRM connector on Salesforce AppExchange!
  • GUMU™ for Salesforce – Sage ERP Integration
  • Leverage real-time enterprise data for better insights of your Customers with Salesforce – Sage 300 integration
  • GUMU™ Integration for Salesforce with Sage 300

Archives

Awards

Premier Partner of the Year Premier Partner of the Year
Platinum Partner of the Year Platinum Partner of the Year
The CEO Story The CEO Story
Gold Partner pf the Year Gold Partner pf the Year
Top Excellence Distributor Top Excellence Distributor
  • na.sales@greytrix.com
  • +1 888 221 6661
  • B301, 3rd Floor, Everest Nivara Infotech Park, MIDC, Turbhe,
    Navi Mumbai 400 705. India

Our Global Locations >>

Who We Are

  • About Us
  • Factor - D
  • Our Network
  • Accolades
  • Career
  •  
  •  

Services

  • Consultation & Implementation
  • Migration
  • Development

Solutions

  • GUMUTM Integration
  • BPortaly
  • Sales Commission
  • Shipping
  • IOT
  •  
  •  

ERP

  • Acumatica
  • Sage Intacct
  • Sage X3
  • Sage 300
  • Sage 100
  • Sage 500

CRM

  • Salesforce
  • D365 CRM
  • Sage CRM
  • Creatio
  •  
  •  
  •  

Other Solutions

  • E-commerce
  • EDI
  • POS

Resources

  • Case Study
  • Blogs
  • Videos
  • E-books
  • News
  •  
  •  

Connect

  • Contact Us
  • Privacy Policy
  • Terms Of Use
  •  

© 2025. Greytrix, All Rights Reserved