Trigger context variables in salesforce

Trigger context variables in salesforce

What are Trigger context variables in salesforce?

Trigger context variables in salesforce

All triggers define implicit variables that allow developers to access run-time context. These variables are contained in the System.Trigger class.

Trigger Context Variables

Following are the context variable available in triggers. Please note variable availability in trigger varies according to the type of trigger events.

Here is List of Trigger Context Variables

  • isExecuting
  • isInsert
  • isUpdate
  • isDelete
  • isBefore
  • isAfter
  • isUndelete
  • new
  • newMap
  • old
  • oldMap
  • size

Here is List of all Trigger Context Variables 

  • Trigger.isExecuting: Returns true if the current context for the Apex code is a trigger, not a Visualforce page, a Web service, or an executeanonymous() API call.
  • Trigger.isInsert: Returns true if this trigger was fired due to an insert operation, from the Salesforce user interface, Apex, or the API.
  • Trigger.isUpdate: Returns true if this trigger was fired due to an update operation, from the Salesforce user interface, Apex, or the API.
  • Trigger.isDelete: Returns true if this trigger was fired due to a delete operation, from the Salesforce user interface, Apex, or the API.
  • Trigger.isBefore: Returns true if this trigger was fired before any record was saved.
  • Trigger.isAfter: Returns true if this trigger was fired after all records were saved.
  • Trigger.isUndelete: Returns true if this trigger was fired after a record is recovered from the Recycle Bin (that is, after an undelete operation from the Salesforce user interface, Apex, or the API.)
  • Trigger.new: Returns a list of the new versions of the sObject records. This sObject list is only available in insert, update, and undelete triggers, and the records can only be modified in before triggers.
  • Trigger.newMap: A map of IDs to the new versions of the sObject records. This map is only available in before update, after insert, after update, and after undelete triggers.
  • Trigger.old : Returns a list of the old versions of the sObject records. This sObject list is only available in update and delete triggers.
  • Trigger.oldMap: A map of IDs to the old versions of the sObject records. This map is only available in update and delete triggers.
  • Trigger.size: The total number of records in a trigger invocation, both old and new.

 

Trigger Context Variables Considerations

  • trigger.new and trigger.old cannot be used in Apex DML operations.
  • You can use an object to change its own field values using trigger.new, but only in before triggers. In all after triggers, trigger.new is not saved, so a runtime exception is thrown.
  • trigger.old is always read-only.
  • You cannot delete trigger.new.

 

For interview questions related to trigger, refer to below link:

Salesforce Interview Questions on Triggers

Triggers in Salesforce

For more details about context variable, please refer to below official link:

Salesforce Official link

 

Permanent link to this article: https://www.sfdcpoint.com/salesforce/trigger-context-variables-in-salesforce/

Salesforce Interview Questions on Triggers

Salesforce Interview Questions on Triggers

In this post I am going to share Salesforce Interview Questions on Triggers

What is a Trigger?

Apex triggers enable you to perform custom actions before or after events to records in Salesforce, such as insertions, updates, or deletions. Just like database systems support triggers, Apex provides trigger support for managing records.

Use triggers to perform tasks that can’t be done by using the point-and-click tools in the Salesforce user interface. For example, if validating a field value or updating a field on a record, use validation rules and workflow rules instead.

What is Trigger Syntax?

trigger TriggerName on ObjectName (trigger_events) {
   code_block
}

What are the various event on which a trigger can fire?

A trigger is a set of statement which can be executed on the following events. In above trigger events one or more of below events can be used with comma separated.

  • before insert
  • before update
  • before delete
  • after insert
  • after update
  • after delete
  • after undelete

What are different type of Triggers?

There are two types of triggers:

  • Before triggers are used to perform a task before a record is inserted or updated or deleted. These are used to update or validate record values before they are saved to the database.
  • After triggers are used if we want to use the information set by Salesforce system and to make changes in the other records. are used to access field values that are set by the system (such as a record’s Id or LastModifiedDate field), and to affect changes in other records. The records that fire the after trigger are read-only.

What are the considerations while implementing the Triggers?

Consider the following before implementing the triggers.

  • Upsert trigger fires on 4 different events :- before(insert, update), after (insert, update)
  • Merge trigger are fired on both events on delete
  • Field history is updated after the trigger has successfully finished processing data.
  • Any callout should be asynchronous so that trigger does not have to wait for the response.
  • A trigger cannot have a static keyword in its code.
  • If a trigger completes successfully the changes are committed to the database and if it fails the transaction is rolled back.

Read the Apex Developer Guide for more detailed considerations.

What are context variables in triggers?

All triggers define implicit variables that allow developers to access run-time context. These variables are contained in the System.Trigger class.

Following are the context variable available in triggers. Please note variable availability in trigger varies according to the type of trigger events.

  • isExecuting: Returns true if the current context for the Apex code is a trigger, not a Visualforce page, a Web service, or an executeanonymous() API call.
  • isInsert: Returns true if this trigger was fired due to an insert operation, from the Salesforce user interface, Apex, or the API.
  • isUpdate: Returns true if this trigger was fired due to an update operation, from the Salesforce user interface, Apex, or the API.
  • isDelete: Returns true if this trigger was fired due to a delete operation, from the Salesforce user interface, Apex, or the API.
  • isBefore: Returns true if this trigger was fired before any record was saved.
  • isAfter: Returns true if this trigger was fired after all records were saved.
  • isUndelete: Returns true if this trigger was fired after a record is recovered from the Recycle Bin (that is, after an undelete operation from the Salesforce user interface, Apex, or the API.)
  • new: Returns a list of the new versions of the sObject records. This sObject list is only available in insert, update, and undelete triggers, and the records can only be modified in before triggers.
  • newMap: A map of IDs to the new versions of the sObject records. This map is only available in before update, after insert, after update, and after undelete triggers.
  • old : Returns a list of the old versions of the sObject records. This sObject list is only available in update and delete triggers.
  • oldMap: A map of IDs to the old versions of the sObject records. This map is only available in update and delete triggers.
  • size: The total number of records in a trigger invocation, both old and new.

Refer to Trigger context variables in salesforce link for more details.

How is Trigger.New Different from Trigger.newMap?

Trigger.New variable returns the list of sObject which has invoked the trigger and Trigger.NewMap returns the map of ID’s with the newly entered records. NewMap is only available in after insert, before and after the update and after undelete.

How is Trigger.new different from Trigger.old?

Trigger.New variable returns the list of sObject which has invoked the trigger and Trigger.old returns a list of the older versions of the records which have invoked the trigger. Trigger.Old is only available in update and delete events

Can a trigger call a batch class?

Yes, we can call a batch class in the trigger as we do in the normal apex code.

Can a trigger make a call to Apex callout method?

we can call a callout method in Apex Trigger but the only condition is that it has to be an asynchronous callout because the trigger flow cannot wait on the response received by the callout method.

Define Recursive Trigger and how to avoid it?

There is a possibility that the result of the trigger can end up calling the same trigger again and can run in a loop, this is known as a recursive trigger. To avoid this scenario we should create a static variable and check the value of this variable before we execute anything in the trigger. For more details refer to below link:

Avoid recursive trigger in salesforce

What do you mean by the bulkifying trigger?

A trigger should be able to handle single record and thousands of record. There are two important point for it:

  • Write triggers that operate on collections of sObjects.
  • Write triggers that perform efficient SOQL and DML operations.

If we will not follow above point we may hit governor limit when records are created/updated/deleted in mass using data loader or other tool.

Bulk Apex Trigger trailhead

Is there any limit on number of triggers define on an object?

We can define as many triggers on an object as we want but it is recommended to have one trigger per object because the order of execution of different trigger is not guaranteed and any trigger can fire first.

Can you explain the order of execution in Triggers?

Following is the order of execution of events which Salesforce perform before a DML Event.

  1. The record is loaded from the database or is initialized in case of upset statement.
  2. New record’s field values are overwriting the old values, now depending on the origin of the request this flow varies: if the request is from a UI page then the following validations are performed by Salesforce:
    1. Any layout specific rules are checked
    2. All the required values are checked at layout and field level
    3. All the field formats are validated along with the maximum length of field values

If the request originates other than UI then Salesforce only checks for Validation of foreign keys.

  1. Now all the before triggers are executed at the database.
  2. Most of the validations are performed again to verify that all the required fields are holding some values and are not null, at this step user defined validations are also executed and the only validation which is not repeated in this step are the rules specific to the layout.
  3. After the success of the previous step, the record is reviewed for duplicate records, by running the duplicate rule. If a duplicate is found the flow is stopped and no further actions performed.
  4. In this step, record is saved to the database but it not committed yet.
  5. Now all the after Triggers are executed.
  6. In this step, assignment rules are executed.
  7. Now if there is any auto-response rule is present then they are executed.
  8. Next in the queues are the workflow, they are executed after the auto response.
  9. If the workflow was updating a field, then the fields updated in this step and the flow after this step varies if this was the case.
  10. If a field was updated then the before and after update triggers are fired once more and standard validation are also executed again. Custom validation escalation rule and duplicate rules are not required to run again.
  11. Once the execution has reached this stage, then process is fired if there are any declared on the object.
  12. Now the escalation rules are executed.
  13. Entitlement rules are executed if any.
  14. If there are any roll-up summary field, then they are calculated at this step and the parent object go through the save process.
  15. Now the sharing rules are executed.
  16. If we reach this stage, then that means no error has occurred and the data is ready to be committed to the database and is committed now.
  17. Now if there is any post-commit logic like email, then that is executed.

 

For more details about trigger please refer below links

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm

Trailhead get started with Triggers

Other posts related to interview questions

Salesforce lightning interview questions

I will keep adding more questions to Salesforce Interview Questions on Triggers.

Permanent link to this article: https://www.sfdcpoint.com/salesforce/salesforce-interview-questions-on-triggers/

Loading spinner in lightning component

Loading spinner in lightning component

What is Lightning Spinner?

Loading spinner in lightning component

Spinners are CSS loading indicators that should be shown when retrieving data or performing slow computations. lightning:spinner displays an animated spinner image to indicate that a request is loading. This component can be used when retrieving data or performing an operation that takes time to complete.

aura:waiting and aura:donewaiting can be used for controlling the loading spinner.

What is aura:waiting and aura:doneWaiting?

aura:waiting : This event is automatically fired when a server side apex action is added using $A.enqueueAction(). This event is always fired before aura:doneWaiting. It is handled by a client-side (javaScript)controller. One component can have only one tag to handle this event.

aura:doneWaiting : This event is automatically fired when all server response(apex)  complete. aura:doneWaiting indicate that the lightning component is done waiting for server response. This event is always fired after aura:waiting. It is handled by a client-side (javaScript)controller. One component can have only one tag to handle this event.

Lightning Loading Spinner Example :

There are two ways of showing lightning spinner. First is using lightning design system.

Loading Spinner using lightning design system

Loading Spinner Apex class
public class AccountController{
    @AuraEnabled
    public static List <Account> fetchAccounts() {
        //Qyery 10 accounts
        List<Account> accList = [SELECT Id, Name, BillingState, 
                                    Website, Phone from Account LIMIT 10];
        //return list of accounts
        return accList;
    }
}
Loading Spinner Lightning Component
<aura:component controller="AccountController">
    <!--aura handler with waiting and donewaiting events--> 
    <aura:handler event="aura:waiting" action="{!c.showSpinner}"/>
    <aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/>
    
  	<!--component attributs -->
    <aura:attribute name="spinner" type="boolean" default="FALSE"/>
    <aura:attribute name="accListToDisplay" type="Account[]" />
    
    <!--loading spinner start-->
    <aura:if isTrue="{!v.spinner}">
        <div aura:id="spinnerId" class="slds-spinner_container">
            <div class="slds-spinner--brand  slds-spinner slds-spinner--large slds-is-relative" role="alert">
                <span class="slds-assistive-text">Loading...</span>
                <div class="slds-spinner__dot-a"></div>
                <div class="slds-spinner__dot-b"></div>
            </div>
        </div>
    </aura:if>
    <!-- Loading spinner end-->    
    
    <!-- Account section start-->
    <ui:button label="Fetch Accounts" class="slds-button slds-button--neutral" press="{!c.getAccounts}"></ui:button>
    <h3 class="slds-section-title--divider">Account List</h3>
    
    <!-- iterate all Account by aura:iteration and display in table--> 
    <table class="slds-table slds-table_bordered slds-table_striped slds-table_cell-buffer slds-table_fixed-layout">
        <thead>
            <tr class="slds-text-heading_label">
                <th scope="col"><div class="slds-truncate" title="ID">ID</div></th>
                <th scope="col"><div class="slds-truncate" title="Name">Name</div></th>
                <th scope="col"><div class="slds-truncate" title="BillingState">BillingState</div></th>
                <th scope="col"><div class="slds-truncate" title="Website">Website</div></th>
                <th scope="col"><div class="slds-truncate" title="Phone">Phone</div></th>
            </tr>
        </thead>
        <tbody>
            <aura:iteration items="{!v.accListToDisplay}" var="acc">
                <tr>
                    <th scope="row"><div class="slds-truncate" title="{!acc.Id}">{!acc.Id}</div></th>
                    <td><div class="slds-truncate" title="{!acc.Name}">{!acc.Name}</div></td>
                    <td><div class="slds-truncate" title="{!acc.BillingState}">{!acc.BillingState}</div></td>
                    <td><div class="slds-truncate" title="{!acc.Website}">{!acc.Website}</div></td>
                    <td><div class="slds-truncate" title="{!acc.Phone}">{!acc.Phone}</div></td>
                </tr>
            </aura:iteration>
        </tbody>
    </table>
</aura:component>

We can define different styles for spinners. Refer this link for more details

https://www.lightningdesignsystem.com/components/spinners/

 

Loading Spinner Lightning component javascript controller
({
    getAccounts : function(component, event, helper) {
        //call getAccountsHelper method
        helper.getAccountsHelper(component, event, helper);
    },
    
    // function automatic called by aura:waiting event  
    showSpinner: function(component, event, helper) {
        // make Spinner attribute true for displaying loading spinner 
        component.set("v.spinner", true); 
    },
    
    // function automatic called by aura:doneWaiting event 
    hideSpinner : function(component,event,helper){
        // make Spinner attribute to false for hiding loading spinner    
        component.set("v.spinner", false);
    }
})
Loading Spinner Lightning component helper
({
	getAccountsHelper : function(component, event, helper) {
        //call apex class method
        var action = component.get('c.fetchAccounts');
        action.setCallback(this, function(response) {
            //store state of response
            var state = response.getState();
            if (state === "SUCCESS") {
                //set response value in accListToDisplay attribute on component.
                component.set('v.accListToDisplay', response.getReturnValue());
            }
        });
        $A.enqueueAction(action);
    },
})
Loading Spinner Lightning component style
.THIS.slds-spinner_container {  
  z-index: 10000;
  position: fixed;   
}
Loading Spinner Lightning Application
<aura:application extends="force:slds">
    <c:LoadingSpinnerExample/>
</aura:application>

Output will look like this when Fetch account button is clicked:

Loading spinner in lightning component

Loading spinner in lightning component

lightning:spinner example

Loading Spinner using lightning:spinner tag

A lightning:spinner displays an animated spinner image to indicate that a feature is loading. This component can be used when retrieving data or anytime an operation doesn’t immediately complete.

Apex class code will be same. There will be slight difference in Lightning component and client side controller.

lightning spinner Lightning Component
<aura:component controller="AccountController">
    <!--aura handler with waiting and donewaiting events--> 
    <aura:handler event="aura:waiting" action="{!c.showSpinner}"/>
    <aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/>
    
  	<!--component attributs -->
    <aura:attribute name="accListToDisplay" type="Account[]" />
    
    <!--loading spinner start-->
    <div class="exampleHolder">
        <lightning:spinner aura:id="mySpinner" class="slds-hide"/>
    </div>
    <!-- Loading spinner end-->    
    
    <!-- Account section start-->
    <ui:button label="Fetch Accounts" class="slds-button slds-button--neutral" press="{!c.getAccounts}"></ui:button>
    <h3 class="slds-section-title--divider">Account List</h3>
    
    <!-- iterate all Account by aura:iteration and display in table--> 
    <table class="slds-table slds-table_bordered slds-table_striped slds-table_cell-buffer slds-table_fixed-layout">
        <thead>
            <tr class="slds-text-heading_label">
                <th scope="col"><div class="slds-truncate" title="ID">ID</div></th>
                <th scope="col"><div class="slds-truncate" title="Name">Name</div></th>
                <th scope="col"><div class="slds-truncate" title="BillingState">BillingState</div></th>
                <th scope="col"><div class="slds-truncate" title="Website">Website</div></th>
                <th scope="col"><div class="slds-truncate" title="Phone">Phone</div></th>
            </tr>
        </thead>
        <tbody>
            <aura:iteration items="{!v.accListToDisplay}" var="acc">
                <tr>
                    <th scope="row"><div class="slds-truncate" title="{!acc.Id}">{!acc.Id}</div></th>
                    <td><div class="slds-truncate" title="{!acc.Name}">{!acc.Name}</div></td>
                    <td><div class="slds-truncate" title="{!acc.BillingState}">{!acc.BillingState}</div></td>
                    <td><div class="slds-truncate" title="{!acc.Website}">{!acc.Website}</div></td>
                    <td><div class="slds-truncate" title="{!acc.Phone}">{!acc.Phone}</div></td>
                </tr>
            </aura:iteration>
        </tbody>
    </table>
</aura:component>
lightning spinner javascript controller
({
    getAccounts : function(component, event, helper) {
        //call getAccountsHelper method
        helper.getAccountsHelper(component, event, helper);
    },
    
    // function automatic called by aura:waiting event  
    showSpinner: function(component, event, helper) {
        // remove slds-hide class from mySpinner
        var spinner = component.find("mySpinner");
        $A.util.removeClass(spinner, "slds-hide");
    },
    
    // function automatic called by aura:doneWaiting event 
    hideSpinner : function(component,event,helper){
        // add slds-hide class from mySpinner    
        var spinner = component.find("mySpinner");
        $A.util.addClass(spinner, "slds-hide");
    }
})

We can have different type of spinner. Refer to below official link for more details lightning spinner

Other similar posts related to lightning components

Salesforce Lightning Interview Questions

 

Permanent link to this article: https://www.sfdcpoint.com/salesforce/loading-spinner-in-lightning-component/

Organization Wide Defaults(OWD) in salesforce

Organization Wide Defaults(OWD) in salesforce

What is OWD In Salesforce?

Organization Wide Defaults(OWD) in salesforce is the baseline level of access that the most restricted user should have. Organizational Wide Defaults are used to restrict access. You grant access through other means like(sharing rules, Role Hierarchy, Sales Teams and Account teams, manual sharing, Apex Sharing ). In simple words Organization Wide Defaults(OWD) specify the default level of access users have to each other’s records.

Object permissions determine the baseline level of access for all the records in an object. Org-wide defaults modify those permissions for records a users doesn’t own. Org-wide sharing settings can be set separately for each type of object.

Important to note that Org-wide defaults can never grant users more access than they have through their object permission.

There are mainly four levels of access :

  • Public Read/Write/Transfer (only available of Leads and Cases)
  • Public Read/Write : All users can view, edit, and report on all records(Given that they have object level permission).
  • Public Read/Only : All users can view and report on records, but only the owner, and users above that role in the hierarchy, can edit them.
  • Private : Only the record owner, and users above that role in the hierarchy, can view, edit, and report on those records.

 

How to determine OWD for your org:

To determine the org-wide defaults you need for your app, ask yourself these questions about each object:

  1. Who is the most restricted user of this object?
  2. Is there ever going to be an instance of this object that this user shouldn’t be allowed to see?
  3. Is there ever going to be an instance of this object that this user shouldn’t be allowed to edit?
Organization Wide Defaults(OWD) in salesforce

Deciding owd in Salesforce

For more detail check this trailhead module.

Setting owd in Salesforce

  1. In Setup, use the Quick Find box to find Sharing Settings.
  2. Click Edit in the Organization-Wide Defaults area.
  3. For each object, select the default access you want to give everyone.
  4. To disable automatic access using your hierarchies, deselect Grant Access Using Hierarchies for any custom object that does not have a default access of Controlled by Parent.

 

owd in salesforce

owd in salesforce

 

For Interview questions related to Salesforce security, please refer below post.

Salesforce security interview questions

Permanent link to this article: https://www.sfdcpoint.com/salesforce/organization-wide-defaults-owd-in-salesforce/

Salesforce security interview questions

Salesforce security interview questions

Salesforce security interview questions or data and security salesforce interview questions

There are different levels of security that is implemented in Salesforce. This post is related to data and security.

What are different Levels of data access in Salesforce?

Organization level security

For your whole org, you can maintain a list of authorized users, set password policies, and limit logins to certain hours and locations.

Object level security

Access to object-level data is the simplest thing to control. By setting permissions on a particular type of object, you can prevent a group of users from creating, viewing, editing, or deleting any records of that object. For example, you can use object permissions to ensure that interviewers can view positions and job applications but not edit or delete them.

Field level security

You can restrict access to certain fields, even if a user has access to the object. For example, you can make the salary field in a position object invisible to interviewers but visible to hiring managers and recruiters.

Record level security

You can allow particular users to view an object, but then restrict the individual object records they’re allowed to see. For example, an interviewer can see and edit her own reviews, but not the reviews of other interviewers. You can manage record-level access in these four ways.

  • Organization-wide defaults
  • Role hierarchies
  • Sharing rules
  • Manual sharing

 

Salesforce security interview questions

Salesforce security interview questions

What is Organization-wide defaults?

Organization Wide Defaults(OWD) in salesforce is the baseline level of access that the most restricted user should have. Organizational Wide Defaults are used to restrict access. You grant access through other means like(sharing rules, Role Hierarchy, Sales Teams and Account teams, manual sharing, Apex Sharing ). In simple words Organization Wide Defaults(OWD) specify the default level of access users have to each other’s records.

For more details please level to below post Organization Wide Defaults(OWD) in salesforce

What is role hierarchy?

It gives access for users higher in the hierarchy to all records owned by users below them in the hierarchy. Role hierarchies don’t have to match your organization chart exactly. Instead, each role in the hierarchy should represent a level of data access that a user or group of users needs.

What are Sharing Rules?

Sharing Rules are automatic exceptions to organization-wide defaults for particular groups of users, so they can get to records they don’t own or can’t normally see. Sharing rules, like role hierarchies, are only used to give additional users access to records. They can’t be stricter than your organization-wide default settings.

What is Manual sharing?

It allows owners of particular records to share them with other users. Although manual sharing isn’t automated like org-wide sharing settings, role hierarchies, or sharing rules, it can be useful in some situations, such as when a recruiter going on vacation needs to temporarily assign ownership of a job application to someone else.

Some more questions for Salesforce security interview questions post.

What is Profile

Each user has a single profile that controls which data and features that user has access to. A profile is a collection of settings and permissions. Profile settings determine which data the user can see, and permissions determine what the user can do with that data.
  • The settings in a user’s profile determine whether she can see a particular app, tab, field, or record type.
  • The permissions in a user’s profile determine whether she can create or edit records of a given type, run reports, and customize the app.

Profiles usually match up with a user’s job function (for example, system administrator, recruiter, or hiring manager), but you can have profiles for anything that makes sense for your Salesforce org. A profile can be assigned to many users, but a user can have only one profile at a time.

What are standard profiles?

  • Read Only
  • Standard User
  • Marketing User
  • Contract Manager
  • System Administrator

 

What is Permission Set?

A permission set is a collection of settings and permissions that give users access to various tools and functions. The settings and permissions in permission sets are also found in profiles, but permission sets extend users’ functional access without changing their profiles.

Permission sets make it easy to grant access to the various apps and custom objects in your org, and to take away access when it’s no longer needed.

Users can have only one profile, but they can have multiple permission sets.

 

What is “View all” and “Modify all” permission?

View all and Modify all permissions are usually given to system administrator. When you grant “View All” or “Modify All” for an object on a profile or permission set, you grant any associated users access to all records of that object regardless of the sharing and security settings.

In essence, the “View All” and “Modify All” permissions ignore the sharing model, role hierarchy, and sharing rules that the “Create,” “Read,” “Edit,” and “Delete” permissions respect. Furthermore, “Modify All” also gives a user the ability to mass transfer, mass update, and mass delete records of that specific object, and approve such records even if the user is not a designated approver.

These tasks are typically reserved for administrators, but because “View All” and “Modify All” let us selectively override the system, responsibilities that are usually reserved for the administrator can be delegated to other users in a highly controlled fashion.

 

Is it possible to restrict permission for users using permission set?

No, Permission Set always extends the permission. It does not restrict permission to users.

If a user does not have access to a specific record type, will they be able to see the records that have that record type?

Yes, Record type controls only visibility of record on UI but not its access to users. If user does not have access to record type then user will not be able to create records for that record type using UI. But user will we able to see records if they have appropriate permission to do so.

For more details related to salesforce security please refer to this trailhead module Data Security

If you have any question related to Salesforce security interview questions, please add your comments

I will keep adding more questions to Salesforce security interview questions.

 

Permanent link to this article: https://www.sfdcpoint.com/salesforce/salesforce-security-interview-questions/

Salesforce Certified Community Cloud Consultant Exam

Salesforce Certified Community Cloud Consultant Exam Tips

How to pass Salesforce Certified Community Cloud Consultant Exam

My Experience

Salesforce Certified Community Cloud Consultant Exam is part of architect journey. But this is optional exam. But I will strongly recommend everyone to appear for his exam if you want to be Salesforce Certified Technical Architect(CTA). Communities management is very important topic from business prospective.

Credential Overview

The Salesforce Certified Community Cloud Consultant credential is designed for those who have experience implementing and consulting on the Salesforce Communities applications in a customer-facing role. Candidates should also be able to troubleshoot and solve platform issues.

Here are some examples of the concepts you should understand to pass the exam:

  • Enable, create, configure, manage membership, and deploy communities
  • Differentiate between the capabilities of different license types
  • Configure the community management console
  • Describe the infrastructure of communities
  • Employ build options

The Salesforce Certified Community Cloud Consultant candidate has the experience, skills, knowledge, and ability to:

  • Enable, Create, Configure, Manage Membership, and Deploy Communities.
  • Employ architecture design options.
  • Configure the community management console.
  • Describe the infrastructure of communities.
  • Employ build options.
  • Describe the capabilities of different deployment types.
  • Differentiate between the capabilities of different license types.
  • Exercise the capabilities of the Community Workspaces (Dashboards, Recommendations, Reputation, Moderation, Insights, Topics, etc.).
  • Exercise the capabilities of the Community Builder and Visualforce (Modify templates, Create new pages, Add / Remove Components, Custom Objects, Custom navigation, Branding, Articles/Knowledge).
  • Implement the appropriate security model for a given use case (Sharing & Users, Person Accounts, Profiles, etc.).
  • Determine if a community is SEO-enabled.
  • Employ fundamental best practices for adoption and engagement.
  • Invest time in studying the resources listed in this Exam Guide and the additional required study materials provided by Salesforce.

Official Study Materials

Official Exam page
Official Exam Guide contains full exam outline
free self-directed resource guides which contains all important links

Important Topics

Expand Your Reach with Communities Trail
Salesforce Communities Overview
My Domain
Communities User Licenses
How to share files in Chatter across communities
Grant Super User Access to Customer Users in Your Community
Share Records Owned By High-Volume Community Users
Grant High-Volume Community Users Access to Records Important
Using Templates to Build Communities
Communities Containers: Options for Building Salesforce Communities
Access Communities in the Salesforce App
Add Authenticated Site.com Pages to Community Tabs
How to Provision Salesforce Communities Users
salesforceben blog Quiz
salesforceben blog guide
proprofs quiz
automationchampion blog

Good Luck for exam 🙂

Permanent link to this article: https://www.sfdcpoint.com/salesforce/salesforce-certified-community-cloud-consultant-exam/

Salesforce Certified Mobile Solutions Architecture Designer Exam

Salesforce Certified Mobile Solutions Architecture Designer Exam Tips

How to pass Salesforce Certified Mobile Solutions Architecture Designer Exam

My Experience

This is one of easier exam from all architect exam. This is optional from Architect journey. I did not had any previous experience in building mobile app. But I had experience in using and customizing Salesforce 1 mobile app(Now its Salesforce App). I had never used Mobile SDK. So i decided to go through trailhead modules which were very helpful in understanding concept. I strongly recommend Develop with Mobile SDK trail if you do not have previous experience in using Mobile SDK. This trail will cover 50% of exam.

Credential Overview

The Salesforce Certified Mobile Solutions Architecture Designer credential is designed for those who assess the architecture environment and requirements and design and implement sound and scalable mobile solutions on the Force.com platform that meet those requirements. Candidates should have experience communicating solutions and design trade-offs to businesses and IT stakeholders.

Here are some examples of the concepts you should understand to pass the exam:

  • Describing the differences between Salesforce1, Native, HTML5 and Hybrid mobile architectures
  • Defining how a customer can choose between Salesforce1 solution and a Customer Mobile Solution
  • Understanding the Salesforce1 app and its configuration/customization options
  • Describing how mobile solution capabilities can be enhanced via connected devices (e.g., Wearables, iBeacons)

Official Study Materials

Official Exam page
Official Exam Guide contains full exam outline
free self-directed resource guides which contains all important links

Important Topics

Native, HTML5, or Hybrid: Understanding Your Mobile Application Development Options
Multi-Device Strategy
Develop with Mobile SDK Trail
Visualforce Mobile
Developing Offline Apps with Salesforce Mobile Services
Building Beautiful Apps With the Salesforce Mobile SDK
Mobile SDK Development Guide
Customize Your My Domain Login Page with Your Brand
MAR 20, 2014 BY STUART LEUNG 5 Ways the Internet of Things Will Make Marketing Smarter
Salesforce Wear Developer Pack
Salesforce Mobile App Security Guide
Salesforce Mobile Push Notifications Implementation Guide
Work Offline with the Salesforce App
Using SmartStore to Securely Store Offline Data

Good Luck for exam 🙂

Permanent link to this article: https://www.sfdcpoint.com/salesforce/salesforce-certified-mobile-solutions-architecture-designer-exam/

Permanent link to this article: https://www.sfdcpoint.com/salesforce/get-started-with-salesforce-dx/

Salesforce Certified Identity and Access Management Designer Exam

Salesforce Certified Identity and Access Management Designer Exam Tips

How to pass Salesforce Certified Identity and Access Management Designer Exam

My Experience

This was my fifth architect exam. I was searching online for this exam. In every post it was written that this is toughest exam from all architect exam. I too agree with all other posts that this is tougher as compare to other architect exam. Some of my friends also failed in this exam in first attempt. But still with good preparation you can crack this exam. Luckily and Credits to salesforce documentation I passed this exam in first attempt with very good score. I studied almost all links mentioned in resource guides. I will cover important topics at end of this post. My advice: Don’t get scared by this exam. Study all important topics, you can crack this exam easily.

Credential Overview

The Salesforce Certified Identity and Access Management Designer credential is designed for those who assess the architecture environment and requirements and design sound, scalable and high-performing solutions on the Force.com platform that meet the Single Sign-on (SSO) requirements. Candidates should have experience communicating solutions and design trade-offs to businesses and IT stakeholders.

Here are some examples of the concepts you should understand to pass the exam:

  • Understanding Configuration requirements of delegated authentication
  • Understanding configuration requirements of SAML
  • Knowledge of when to use IDP initiated vs. service provider initiated
  • Describing provisioning and de-provisioning related to SAML, Oauth, and OpenID Connect

Official Study Materials

Official Exam page
Official Exam Guide contains full exam outline
free self-directed resource guides which contains all important links

Important Topics

Trailhead
Create a Connected App
Digging Deeper into OAuth 2.0 in Salesforce
Enabling Single Sign-On with the Force.com Platform
Identity Provider Values
Salesforce Communities Licenses
Configure a Salesforce Authentication Provider
Best Practices and Tips for Implementing Single Sign-On
Single Sign-On with SAML on Force.com
My Domain
Scope Parameter Values
Single Sign-On
Inside OpenID Connect on Force.com
Configure SSO Across Multiple Salesforce Orgs
Secure Coding Single Sign On
Modify Session Security Settings
Configure SSO to Salesforce Using Microsoft Active Directory Federation Services as the Identity Provider
Setting Up the App Launcher (Salesforce Classic)
Social Single Sign-On with OpenID Connect
Configuring SSO for Mobile and Desktop Apps Using SAML and OAuth
Social Single Sign-On with OpenID Connect
OAuth Authentication
SAML Single Sign-On for Canvas Apps
Configuring SAML SSO for a Canvas App
Two-Factor Authentication
Seamless Authentication with Force.com Canvas
Customizing User Authentication with Login Flows
Deploying Single Sign-On and Identity for Employees, Customers, and Partners
How to Provision Salesforce Communities Users
About Just-in-Time Provisioning for SAML
Integrating Active Directory with Salesforce using Identity Connect
Salesforce memo Blog
Quizlet
alwaysablezard blog

Good Luck for exam 🙂

Permanent link to this article: https://www.sfdcpoint.com/salesforce/salesforce-certified-identity-and-access-management-designer-exam/

Salesforce Certified Development Lifecycle and Deployment Designer Exam

Salesforce Certified Development Lifecycle and Deployment Designer Exam Tips

How to pass Salesforce Certified Development Lifecycle and Deployment Designer Exam

My Experience

This was my third architect exam. I will rate this one also easier to crack. Most of people who are working in Salesforce development get chance to practically work in most of topics which are required for this exam. It requires good knowledge about development & deployment lifecycle and all tools which are required for development & deployment. I had used most of tools and features in my project. So it was easy for me. But if you have not worked on it, don’t worry this exam preparation will be good opportunity for you to learn so many good things. Go through all topics mentioned in resource guides. I will list down most important topics at end of this post.One more important point to mention that most of questions in this exam were scenario based.

Credential Overview

The Salesforce Certified Development Lifecycle and Deployment Designer credential is designed for those who assess their architecture environment and requirements and then implement management solutions on the Force.com platform that meet those requirements. Candidates should have experience communicating solutions and design trade-offs to businesses and IT stakeholders.

Here are some examples of the concepts you should understand to pass the exam:

  • Experience with project and development lifecycle methodologies
  • Experience providing requirements traceability through the project’s lifecycle
  • Awareness of Salesforce and third-party application development lifecycle tools
  • Understanding test plan design and evaluating effectiveness

The Salesforce Certified Development Lifecycle and Deployment Designer candidate has the experience, skills, knowledge, and ability to:

  • Communicate development methodologies and trade-offs.
  • Provide alternatives to development methodologies.
  • Ensure Governance through change management and release management.
  • Ensure Governance in environment management.
  • Develop and execute effective deployment strategies.
  • Use technical tools to execute deployment strategies and environmental approaches.
  • Describe the capabilities and characteristics of metadata API.
  • Describe the capabilities and constraints of the tools available for accessing the Metadata API (Force.com Migration Tool, Force.com IDE, and Change Sets).
  • Describe source control and continuous integration, how they are used, and when they should be recommended.
  • Utilize testing methodologies.
  • Describe strategies to restore and back up.
  • Understand deployment KPIs.
  • Follow Salesforce release schedules and know how they may impact deployments and projects.

A candidate for this exam will likely need assistance with:

  • Environment configuration.
  • Code development.
  • Test execution.
  • Code migration.
  • Configuring continuous integration/development architectures.
  • Setting up a governance process.

Study Materials

Official Exam page
Official Exam Guide contains full exam outline
Free self-directed resource guides which contains all important links

Important Topics

Development Lifecycle Guide
An Introduction to Environments
Application Lifecycle Management Trailhead
Fifteen Things to Consider Before Your Next Data Migration
A Guide to Application Performance Profiling in Force.com
9 Steps to Effective Change Management
Change Management Trailhead
Change Sets
Sandbox Setup Considerations
Change Sets Best Practices
Force.com IDE
Understanding Metadata API
Bestpractices:Continuous Integration Techniques
Agile Development Through Salesforce

Good Luck for exam 🙂

Permanent link to this article: https://www.sfdcpoint.com/salesforce/salesforce-certified-development-lifecycle-and-deployment-designer-exam/