Inherited Sharing in Apex Inherited Sharing is available with Salesforce Winter'19 release. Use Inherited sharing keyword on apex class which allows the class to run in sharing mode of class that called it. Inherited sharing ensures that our apex code is not used in unexpected or insecure way. An Apex class with inherited sharing runs as with sharing when used as a Visualforce page controller, Apex REST service, or an entry point to an Apex transaction. If the class is used as the entry point to an Apex transaction, an omitted sharing declaration runs as without sharing. However, inherited sharing ensures that the default is to run as with sharing. A class declared as inherited sharing runs only as without sharing when explicitly called from an already established without sharing context. Example: We have declares Apex class with inherited sharing and a visualforce invocation of that Apex code. Because of the 'inherited sharing' declaration, only contacts for which...
Posts
- Get link
- X
- Other Apps
By
Puneet Mishra
-
Lightning Web Component: Render elements conditionally to render HTML conditionally we will use if:true|false directive. Directives are special HTML attributes that add dynamic behavior to HTML templates. below are the list of directive: 1. for:each={array} : use this directive to iterate over an array and render a list. 2. for:item= "currentItem" : Use this directive to access th e current items where currentItem is an identifier that model injects into the current scope. 3. for:index="index" : Use this directive to access the current item's zero-based index where index placeholder is a new identifier that the model injects into the current scope. 4. if:true|false={expression} : Use this directive to conditionally render DOM elements in a template. The expression can be a JavaScript identifier (for example, person) or dot notation that accesses a property from an object (person.firstName). The engine doesn’t allow computed express...
- Get link
- X
- Other Apps
By
Puneet Mishra
-
Connect Dropbox with Salesforce as IdP An identity provider is a system entity that creates, maintains, and manages identity information for principals while providing authentication services to relying applications. An identity provider is “a trusted provider that lets you use single sign-on (SSO) to access other websites". When you log into trailhead by clicking 'Log in with Facebook', 'Log in with Google+' or 'Log in with Linkedin' then that's the example of Google, Facebook, Linkedin acting as trusted identity provider, and authenticating you on behalf of trailhead. Identity provider saves your time spent in creating and maintaining your credentials and helping third party websites from storing and protecting your information. Salesforce supports Identity provided-initiated login - when Salesforce logs in to a server provider at the initiation of the end user. Service provider-initiated login - when the service provider requests S...
- Get link
- X
- Other Apps
By
Puneet Mishra
-
Apex Service Layer : Separation of Concerns Separation of Concerns (SoC) (modularity,information hiding) The most important principle of Software is Separation of Concerns(SoC).Software system must be decomposed into parts that overlap in functionality. Separation of Concerns is a design principle for separating a program into different sections so that each section addresses a separate concern (information). A program which implements SoC is consider as modular program. Modularity is achieved by encapsulation. Encapsulating means information hiding. SoC results in simplified and easy maintenance of code which later help reusing the code and easy to upgrade, i.e. one can modify one piece of code without knowing the details of other section of code. Good code benefits from careful design and foresight and complex code gets out of hand if you don't partition it properly. When code is heavily intermixed, it become error prone, difficult to maintain and hard to learn. Benef...
- Get link
- X
- Other Apps
By
Puneet Mishra
-
Reset Password button missing for Community Users If you are created a community user and you don't see 'Reset Password' button on user detail record then one of the reason of missing button is that you might not have added that user to community as member. Steps to add the Community User: 1. Go to Setup. 2. Search 'All Communities' in Quick Find. 3. Click on workspaces link next to community. 4. Click on Administration. 5. Select Members from left panel 6. Select the user's profile and click on Add.
- Get link
- X
- Other Apps
By
Puneet Mishra
-
Lightning Tooltip A lightning:helptext component displays an icon with a popover containing a small amount of text describing an element on screen. The popover is displayed when you hover or focus on the icon that's attached to it. By default, the tooltip uses the utility:info icon but you can specify a different icon with the iconName attribute. Visit https://lightningdesignsystem.com/icons/#utility to view the utility icons. Let's create tooltip component and will try to make it reusable. LightningToolTipcmp Above Lightning tooltip component can be reused by passing the help text as a attribute. Reference: Lightning Web Components