Easily Configure Syncfusion JavaScript UI Controls in Salesforce
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (181).NET Core  (28).NET MAUI  (227)Angular  (113)ASP.NET  (49)ASP.NET Core  (81)ASP.NET MVC  (87)Azure  (42)Black Friday Deal  (1)Blazor  (236)BoldSign  (14)DocIO  (24)Essential JS 2  (110)Essential Studio  (200)File Formats  (73)Flutter  (136)JavaScript  (226)Microsoft  (122)PDF  (83)Python  (1)React  (105)Streamlit  (1)Succinctly series  (131)Syncfusion  (964)TypeScript  (33)Uno Platform  (3)UWP  (3)Vue  (46)Webinar  (53)Windows Forms  (59)WinUI  (72)WPF  (163)Xamarin  (159)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (11)Business intelligence  (55)Button  (4)C#  (164)Chart  (147)Chart of the week  (58)Cloud  (15)Company  (440)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (73)Development  (681)Doc  (7)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (13)Excel  (43)Extensions  (23)File Manager  (7)Gantt  (21)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (522)Mobile MVC  (9)OLAP server  (2)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (45)Performance  (13)PHP  (2)PivotGrid  (5)Predictive Analytics  (6)Report Server  (3)Reporting  (8)Reporting / Back Office  (9)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (5)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (32)Solution Services  (4)Spreadsheet  (11)SQL  (15)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (406)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (628)What's new  (341)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Easily Configure Syncfusion JavaScript UI Controls in Salesforce

Easily Configure Syncfusion JavaScript UI Controls in Salesforce

Our Syncfusion JavaScript UI controls suite is the only suite you will ever need to build an application. It contains over 65 high-performance, lightweight, modular, and responsive UI components in a single package. In this blog, we are going to see how to configure Syncfusion JavaScript UI controls in the Lightning component framework to use them in the Salesforce Lightning App Builder tool.

What is Salesforce?

Salesforce is a cloud computing software as a service (SaaS) company that specializes in customer relationship management (CRM). Its services allow business users to use cloud technology to better connect with their customers and partners.

In the Lightning version of Salesforce, we can create custom components and use them in the Lightning App Builder tool which contains everything you need for a custom app, such as custom and standard objects, and custom tabs. It also includes Lightning page tabs and utilities like Lightning Voice.

Note: The Lightning Apps Builder tool isn’t available in Salesforce Classic.

Creating a custom component in Salesforce

To create a custom component in Salesforce, first you need to log in to your Salesforce account. If you don’t have one, use the free trial option. Then, follow these steps:

  1. From the Settings option, open the Developer console as shown in the following screenshot.
    Open the Developer console option from the settings
  1. Then, in the Developer Console window, select File > New > Lightning Component.
    In the Developer Console window, select File->New-> Lightning Component
  1. Now, provide a name (I’m using the name EJ2SalesComponent) and a description for the component. Then, select the following options:
      1. Lightning Tab
      2. Lightning Page
      3. Lightning Record Page

    Click the Submit button.

Provide the name as EJ2SalesComponent for the component and select the Lightning Tab, Page and Record Page check boxes

Now, we have created our custom Lightning component in Salesforce and now, let’s proceed with adding Syncfusion JavaScript UI controls to it!

Adding Syncfusion controls in the custom UI component

If you are new to our JavaScript UI controls, you can find demos and documentation at the following links:

To add Syncfusion UI controls in the newly created Lightning component, follow these steps:

  1. First, we need to load the required scripts and styles in the static resources. To do so, follow the steps listed in the Defining Static Resources documentation.We recommend you use the Syncfusion Custom Resource Generator (CRG) utility to download the required component scripts and styles. Refer to the CRG documentation page for information on how to use the utility.The following image shows the loaded script and CSS files for the DataGrid and Button components.
    Loaded script and CSS files for the DataGrid and Button components
  2. Next, add the script and style refrence from the static resources to the EJ2SalesComponent.cmp (component) file. Refer to the following code example.
    <ltng:require scripts="{!$Resource.ej2}" styles="{!$Resource.ej2Css}"
  3. Then, add the necessary HTML tags for the controls in the component file. Here, we are going to add the code for the Button and Grid controls in the EJ2SalesComponent.cmp file.
    // EJ2SalesComponent.cmp
    <aura:component  implements="flexipage:availableForRecordHome" access="public">
        <ltng:require scripts="{!$Resource.ej2}" styles="{!$Resource.ej2Css}"
    	<p>EJ2 Components</p>
               <h1>Grid Component</h1>
             <div id='grid'></div>
             <h1>Button Component</h1>
            <button id=’btn’>
  4. Now, add a controller page (EJ2SalesComponentController.js) by using the right sidebar. Refer to the following screenshot.
    Add the controller page EJ2SalesComponentController.js by using the right sidebar
  5. The following control intializes the DataGrid and Button UI controls in the controller.js file.
    // EJ2SalesComponentController.js
    	doInit : function(component, event, helper) {
            // dataSoruce for Grid
            var data = [{ OrderID: 10248, CustomerID: 'VINET', Freight: 32.38, OrderDate: new Date(8364186e5) },
                { OrderID: 10249, CustomerID: 'TOMSP', Freight: 11.61, OrderDate: new Date(836505e6) },
                { OrderID: 10250, CustomerID: 'HANAR', Freight: 65.83, OrderDate: new Date(8367642e5) },
                { OrderID: 10251, CustomerID: 'VICTE', Freight: 41.34, OrderDate: new Date(8368506e5) },
                { OrderID: 10252, CustomerID: 'SUPRD', Freight: 51.3,  OrderDate: new Date(8367642e5) },
                { OrderID: 10253, CustomerID: 'HANAR', Freight: 58.17, OrderDate: new Date(836937e6) },
                { OrderID: 10254, CustomerID: 'CHOPS', Freight: 22.98, OrderDate: new Date(8370234e5) },
                { OrderID: 10255, CustomerID: 'RICSU', Freight: 148.33, OrderDate: new Date(8371098e5) },
                { OrderID: 10256, CustomerID: 'WELLI', Freight: 13.97, OrderDate: new Date(837369e6) }];
            //control intialization
            var Button = new ej.buttons.Button({content:'snm',cssClass:'e-primary'},'#snm');
            var Grid = new ej.grids.Grid({dataSource: data},'#grid')
  6. Now, the custom UI Lightning component with Syncfusion UI controls is created and ready to be used in the Lightning App Builder tool. We can test the created component in the developer console itself using the Lightning App Builder. To do this, you need to create your own Lightning App and add the reference for the component as shown in the following code example.
    <aura:application >
      <c:EJ2SalesComponent />
  7. After that, click the Preview button in the right pane.
    Click the Preview button in the right pane
  1. Then, the preview of the component will be loaded in the browser like in the following screenshot. Here, we can verify the component structure and alignment.
    Configuring JavaScript UI controls in Salesforce
  1. To use the custom Lightning UI component as a tab or within a page, refer to the instructions provided in the Add Lightning Components as Custom Tabs in a Lightning App documentation.

Now, we have succesfully configured the Syncfusion JavaScript DatGrid and Button UI controls into the newly created custom Lightning component in Salesforce.


I hope you now have a clear idea of how to create a custom Lightning UI component with Syncfusion JavaScript UI controls in Salesforce. We look forward to you trying out this integration and providing your feedback in the comments section below.

Syncfusion has 1,600 components and frameworks for WinFormsWPF, WinUI(Preview),  ASP.NET(Web FormsMVCCore), UWPXamarinFlutterJavaScriptAngularBlazorVue, and React. As proven in this blog post, you can also integrate these UI components into Salesforce and build astonishing customer relationship management apps!

For existing Syncfusion customers, the newest version of our components is available for download from the License and Downloads page. If you are not yet a Syncfusion customer, you can try our 30-day free trial to check out our available features. You can also try our samples from this GitHub location.

You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

If you liked this blog post, we think you’ll like the following articles too:


Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed