Posts

Interview Questions for Lighting Experience

Interview Questions. 1. What are the type of events into Salesforce Lightning component? a. Application Event – Scope of this event is throughout the lightning App and any component which has registered for this event would get a notification. b. Component Event– Scope of this event is within itself or the parent component of this event, all the components declared within the parent component would get notified of this event. c. System Event- these are the events fired by Salesforce’s system during the lifecycle of the lightning app. 2. What are the basic differences between Application Event and Component Event? Component events are used to do communication between child and parent. They use bubbling and capture same as used in DOM events. A change in a child component can be communicated to the parent component via component event. Application events are used to communicate any change in the component to a broader audience. Any component who has registered for this even...

What is DevOps? What are the duties of a DevOps Engineer?

Image
Generally, people have lots of misconception regarding  DevOps . So let me first tell you  “What DevOps is not”. DevOps is not simply combining Development & Operations teams DevOps is not a separate team DevOps is not a product or a tool DevOps is not automation What DevOps is actually? DevOps is a culture that is being followed by many huge organization. It is a continuous process and contains various stages such as : Continuous Integration Continuous Development Continuous Testing Continuous Deployment Continuous Monitoring The main goal of DevOps is to increase the quality of the product to a great extent and to increase the collaboration of Development and Operation team as well so that the workflow within the organization becomes smoother. The main duties of a DevOps engineer are to: Understand the needs and challenges of a client across operations and development, and partner to formulate solutions that support their business and techn...

Auto Number (Display Format) + Trigger

This needs to display into another field of the other object. However, when that record is created the field is generated with the Autonumber but not the display format of AAA-{0000}. Solution : -  trigger AutoNumbertrg on Account (before insert) {   Integer intCounter = 0 ;   Account lstAcc = [SELECT Id,AutoNumber__c FROM Account   Order BY Createddate DESC LIMIT 1];   if (!String.Isblank (lstAcc.AutoNumber__c)){       String s1 = lstAcc.AutoNumber__c;       system.debug('Test debug S1:  ' + s1 );       String sNumbers = s1.substringafter( '-');       System.debug('sNumbers ' + sNumbers );       i...

LIMIT_EXCEEDED, Maximum per user subscription limit reached (copy)

Problem :  Chatter EntitySubscription Limits ? In my project, we follow certain records via after update triggers, if some conditions match. I am getting this error on follow code that creates an EntitySubscription via trigger Description: Error:Apex trigger FollowXYZ caused an unexpected exception, contact your administrator: FollowXYZ: execution of AfterUpdate caused by: System.DmlException: Insert failed. First exception on row 0; first error: LIMIT_EXCEEDED, Maximum per user subscription limit reached.: []: Solution : Before Inserting the 'EntitySubscription' record, Get the count() subscription-id.  If the subscription-id count() is greater then 500, then delete the older EntitySubscription records first, then proceed with inserting the new EntitySubscription records. Code Snippet : 1) Count(userID) SELECT count()  FROM EntitySubscription   WHERE SubscriberId = '00530000005nnYnAAI'    AND ParentId IN...

Named Credentials - A turning point for callouts in Apex

What are Named Credentials? Specifies the URL of a callout endpoint and its required authentication parameters(methods & urls) with point & click. Can be seen as advance version of remote site settings in one scenario but it has totally different purpose. Remote site settings are not required for this. Named credentials handles all authentication requirements like headers to be set etc. It is an alternate of using remote site settings with apex code handling. It is much more secure. Supports two types of authentication protocols for now :  Basic Authentication(Password authentication) or OAuth. Can be configured easily if Authentication needs to be done in  User Context  or  Admin Context OAuth Protocol: This requires a proper setup of  Auth provider  in salesforce with configurations like consumer key, consumer secret, callback url. We can also connect two orgs with this method.To connect with another salesforce, connect...

Salesforce: Serial and Parallel Approval

Image
Approval process has been introduced in Salesforce platform sometimes back. But when someone ask you, if Salesforce support Parallel and Serial approval process? The answer is YES, although Salesforce do not implicitly said it is parallel or serial approval process. The good thing is, this functionality available out of the box. So you do not need to write any code. Just with point and click configuration, you can build this process within hours. Parallel Approval Parallel Approval means you are sending multiple approvals out in one step of the approval process. Any approver able to approve without need to wait for other approvers to approve. The approver can be specific  users ,  a queue  or  related user  in the record. How to configure this in Salesforce? When you reach Approval Steps -  Select Assigned Approver , choose  Automatically assign to approver(s) In sample above, when user submit for approval, it will go to a user 'Maria Ann' a...