To create Radar chart in lightning component, we will be using chart.js library. If you are new to lightning then please go through basics and also I would suggest to go through lightning trailhead modules.
This is one of most awaited functionality provided by Salesforce platform recently. In many projects, we were getting request from clients on different kind of auditing reports like “most used functionality by users, who is exporting reports, API call usage, link clicks” etc. Event monitoring tool helps to provide many information related to auditing reports. We can track nearly 29 different types of event like
- API Calls
- Report exports
- Logins and Logout
- Visualforce page loads
- Apex executions
This tool is free only for developer edition and for enterprise, unlimited or professional editions only login and logout events are available ; other events are available on extra cost. One important aspect to notice about this feature is that it is API only feature. These logs are stored in Object EventLogFile. We can use tools like Workbench or SOQL in developer console to fetch records. Continue reading
Recently, I came across few errors of Git and found very time consuming to fix those. Let’s discuss what are those errors and how we can fix it.
Error : Permission denied (publickey). fatal : could not read from remote repository
This error came while trying to push changes to remote repository using ssh keys. This error means we need to provide information about SSH key. it can be done by setting environment variable GIT_SSH. Continue reading
This was first and official IDE from Salesforce and enjoyed monopoly as one and only IDE for many years.
The Force.com IDE is a powerful client application for creating, modifying and deploying Force.com applications. Based on the Eclipse platform and built on the Tooling API, the Force.com IDE provides a comfortable environment for programmers familiar with integrated development environments, letting you code, compile, test, package, and deploy all from within the IDE. Much of the actual work, such as compilation, happens on the Force.com platform—the Force.com IDE performs the communication and result parsing transparently.
The Force.com IDE is open-source and you can download the source code on GitHub.
Workbench is one of widely used tool in Salesforce when it comes to exploring REST API of Salesforce. However I wanted to export REST API response in Binary format and therefore used cURL. cURL is open source command line library mostly used to test http request. It can be downloaded from here and official documentation about how to use cURL can be referred from here.
To use cURL with Salesforce REST API, we will need to use username – password flow of OAuth2. To use OAuth2, we need to create connected App. You can check “Create Connected app” section of this post. You can enter any URL for callback or if you have already created any connected app in past, then it can be used. After creating connected app, note “Consumer key” and “Consumer Secret” somewhere.
create file “LoginInfo.txt” file which will have all required login information in URL encoded format
grant_type=password& client_id= 3MVG9iTxZANhwsdsdsdsdspr0Lu3QNRNKk4c2FejzTys5Mlp43UeSHBuhWWgRjEUyV6xE7N0GostjR3sRat & client_secret=21961212323233121943 & firstname.lastname@example.org & password=myPWDAndSecurityToken
make sure there is no space in above file. I have added some space for sake of readability.
grant_type=password informs Salesforce to use “Username and password” flow of OAuth2, We are also passing client_id, client_secret, username and password. Continue reading
I have not added capability for image preview like I did in previous did, but it can be easily done by referring this blog post from Peter Knolle.
To run this code you will need 3 static resources in your visualforce page :
- Bootstrap (totally optional and can be safely ignored) and
If you want, below images can be used to try this code. Also, please note – If you are using mobile camera to capture barcode, make sure image is white else this library will not work.
- Lightning Component developers guide
- Lightning Design System
- Salesforce style Bootstrap CSS
- Lightning Components tutorial on trailhead
- Basics of Lightning components by Jitendra
- Building lightning components in Spring 15 by Jeff Doughlas
- Search bar and contact list component in Lightning by Salesforce
- Working with controllers by Peter Knolle
- Handling custom events in Lightning Component by Peter Knolle
- Debugging Lightning Components by Peter Knolle
- Extending Lightning Components by Peter Knolle Continue reading
Salesforce login procedure was like all other web applications around us where we need to provide username and password. Few years back, Salesforce also introduced two step authentication process by using mobile SMS feature. Salesforce also supports SSO, where we can have custom identity provider and custom authentication can be implemented like RSA token based, Yubikey etc. Previously there were no way to participate in standard login process of Salesforce however from Winter 15, we have one more feature known as login flow.
Using Login flow, we can participate and change login process of Salesforce. To explain more, lets consider below problem definition which we will try to solve using login flow in this post.
Problem definition :
Customer has implemented IDp initiated SSO. Whenever any user is logging into corporate network, start up script automcatically uses IDp initiated login to auto start Salesforce. Management wants to know that how many users are really using system and deacticate all users who has not used it in last 45 days.
How to solve ?
As all users are automatically getting logged into system because of startup script , we cannot use standard report to get users who has not logged into salesforce in last 45 days. In this situation we can create custom solution using Login flow.
Solution is very easy. We will create custom object and insert login detail into this object if user accepts terms and condition everytime when trying to login into system. If startup script opens Salesforce page and user ignores selecting terms and condition then it will not create any record.
What is Login flow ?
Login flow is not very new concept to Salesforce admins or developers. It is nothing but flow which can be set into Login flow for each profile.
Security in Login flow
If user is in login flow screen and try to bypass it by directly navigating to URL then Salesforce throws insufficient privileges error because user has access to only login flow, nothing else.
Detailed steps :
Create Custom Object by name something like “Login Detail” with Name as autonumber type and custom field of type lookup to user as shown in below image.
Below are short videos on how to get things done in Salesforce from documentation and user interface team.
Formulas are very powerful. They can help you to do everything from pulling informations from parent to child objects or caluclate something on basis of other field present on same record or parent record. Below are list of videos to make you more productive on formula.