Blog posts on Salesforce, Java, .Net, PHP, Heroku and many more
Launch Lightning Component using formula field and also read query parameter in Salesforce Lightning Component
Before Summer 18, to read parameter in Lightning Component, we had to wrap Lightning Component in Lightning Application. After Summer 18, it has changed for good.
In this blog post we would create a formula field to launch Lightning Component (yes, you read it right). And then we would read URL parameter in Lightning Component using pageReference provided by interface lightning:isUrlAddressable.
Below command can be executed from anywhere in your system.
git config --global credential.helper wincred
Turn off Warning _LF will be replaced by CRLF_
git config core.autocrlf true
git config --global core.autocrlf true
In Unix systems the end of a line is represented with a line feed (LF). In windows a line is represented with a carriage return (CR) and a line feed (LF) thus (CRLF). when you get code from git that was uploaded from a unix system they will only have an LF. Continue reading “Frequently Used Git Commands”
How to use Facebook, Twitter, Wechat, Microsoft, Yahoo & many more as a Identity Provider for Salesforce with the help of Janrain Auth Provider – Video included
Salesforce supports many Auth Provider out of the box, which can be used as Identity provider. Some of the examples – Facebook, Google, Github, Salesforce, OpenId Connect , Linked In and Janrain.
If you are in need to use Wechat , Yahoo or some other social account like Microsoft, don’t get disappointed. Even if they are not available out of the box as Auth Provider in Salesforce , Salesforce has provided magical box Janrain. Janrain supports vast list of social platform which can be used as Identity provider for your Salesforce instance.
How Janrain is different compared to other SSO solutions for Salesforce
Salesforce Interview Questions related to Person Account
231. How much space is taken by each Person Account record ? Ans : As it acts as Account (2kb) and Contact (2kb), total space taken is 4kb.
232. Can we create a field on Person Account directly ? Ans : No. We need to create a field on contact which will appear for Person Account as well. Fields created on Contact appear on Account with extension __pc.
233. Can we select Person Account as parent for Business Account and create Account hierarchy ? Ans: Person Account is used for B2C & Business Account is B2B model in Salesforce. In real life, headquarter or head office of business Account can never be person Account. Therefore we cannot choose Person Account as parent Account for Business Account. It will throw error –Parent Account may not be a person account.
How to create a lookup field in Flow by embedding Lightning Component
Most of us are big fan of Flow but at the same time we miss a lot of obvious features like lookup fields, model dialogues etc. This blog post might bring excitement and motivation to give more attention and love to Flow.
How to use SalesforceDX (SFDX) with Sandbox, Developer and Production Orgs
We have gone through few blog posts about SFDX and its capabilities in past. In this post, I will explain steps on how to use SFDX with developer, Sandbox or Production Org. In short we will discuss how to use SFDX with non Scratch Orgs. We would be using official Salesforce IDE for SFDX, which is VSCode.
Assumption – VSCode extension is already installed in your VSCode.
Create SFDX project in VSCode
Open VScode and press cmd+Shift+p, It will give some option. Select SFDX: Create Project.
I have read many posts and watched video to understand Microservices precisely however I found Martin Fowler’s explanation about Microservices most helpful. This blog post is just the recap & summary of what I understood about Microservices Architecture.
Characteristics of Microservices
Build services in form of Components
Components can be independently replaceable and upgradable
Components can be combination of Libraries and Services
Services can be built in other languages and services can inter communicate
Organized keeping business rules in mind
Traditionally (Monolithic), Services were organized considering technical aspects like different services related to UI, Database, Server etc
Microservices, suggests to group it as per business capabilities like shipping, Order, Catalog etc
Smart end points and dump pipe
In ESB (aka spaghetti box 😉 lol), we tend to add all smartness in ESB itself and endpoint is just a dump where consumer gets preprocessed data
MicroServices on other hand encourages dump pipe (ESB) and smart endpoints
Decentralized Governance or Data Governance
Every Service should be responsible for their own database & persistence
Can’t communicate to other databases directly, it should be via API’s only (These are mostly inspired by Amazon’s 2 Pizza team size)
Every service can have different languages or tools
Continuous Delivery is very important for each services to make sure there is no or minimal down time
Top class monitoring capabilities to perform analysis of degraded performance or downtime
Important to have roll back plan and ability to spin up new server in case of service or service fail
Design for failure
As there could be many microservices, its inevitable that they would fail.
Companies like Netflix, they have a application (chaos monkey) which randomly goes out and fail their microservices deliberately
Its important to perform these kind of exercises to understand how resilient their network and microservices are.
Improve Lightning Component performance using simple 15 rules like Storable Actions, avoiding server trips, Lightning Data Service, Unidirectional data binding, creating component APIs etc
Avoid Server Trips
Most obvious idea to improve Lightning Component Performance is to avoid server trips. Let’s say, you need to know the queue Id to be assigned as owner in Case and also need custom setting information to derive the behavior of Lightning Component. There are two ways to achieve this – Call Apex Controller two times vs return combined results from Apex in single call and process JSON in client side controller of Lightning Component.
2. Use Storable Action
In this approach, Lightning component shows cached result instead of making immediate server trip. Lightning component will make server (Apex) call in background and if cached result is stale, then it would cache and refresh the lightning component. This is very useful for devices which has slow internet connections. If you are Facebook or Google News user, you would be easily relate it. When we open these apps, it shows previous feed and if there are new feeds, it gives us option to refresh view or automatically refresh it. All you have to do is, on client side controller of Lightning component, mark action as storable using this code action.setStorable(). This blog post explains working of storable action in detail. Continue reading “15 ways to improve performance of Lightning Components in Salesforce”