Access modifiers are used in apex class in salesforce. Similar to Java programming, Salesforce supports 4 different access modifiers in salesforce.
- private
- protected
- public
- global
Access modifiers are used in apex class in salesforce. Similar to Java programming, Salesforce supports 4 different access modifiers in salesforce.
If you know Java or Dotnet applications, then you may observe that everything is written as a class. There are different access levels. You can also define class within a class just like inner class and outer class etc.
Salesforce also provides similar syntax that is followed in Java. Syntax can be to defining a class or variables in class or a wrapper class everything is similar to the syntax followed in Java programming.
Let us see a class and things that can be done in a class in Salesforce.
public class A_Class_Name{
// Variables
public static string a_Variable {get;set;}
// Constructor
public A_Class_Name(){
// Constructor business logic code
}
// Methods
public void a_Method_Name(Integer a_Variable1, Ingeter a_Variable2){
// Business logic code
}
}
Continue reading “Apex Class, Variables, Constructor & Methods in Salesforce.” Every technology has some or other programming language. There are well know programming languages namely, C, C++, Java, DotNet, Python, Javascript and many more. Object Oriented Programming Language (OOPS) is a concept on which most of the languages work. Similarly, Salesforce has its own programming language and it is called Apex Programming language.
Apex Programming language
Apex Programming language is strongly typed and works on OOPS concept. It uses similar syntax that looks like Java and acts like database stored procedures. Apex enables developers to add business logic to most of the system events which include button click, page load, related record update etc.
Continue reading “Apex Programming Language in Salesforce”When you want to share a record through apex sharing you can provide custom reason so that it will give a meaningful reason to why the record is shared with a specific user or group.
Custom sharing reason is only available for custom objects and you can set custom sharing reason in salesforce classic version only.
Continue reading “Apex Sharing Reason in Salesforce”There will be some scenarios in organization where you want to share a record based on some complex scenario, but you cannot define the complex scenario as a criterion in sharing rule. Then the question is how you can share a record, of course you can share them manually. But how many times you can share records manually, trust me its annoying to share records manually again and again.
Salesforce provides another way to share a record and that is through apex code via share object. So what is Share object? Every standard and custom object will have a share object in salesforce with predefined fields as shown below.
There will be some scenarios where all records are privately owned, you want to share records based on some criteria with a specific user or group of users or to specific role. In such cases sharing automation should work on all records of that object. You can build a sharing rule which will handle such situation.
Consider a scenario where records should be shared based on continent field and those records should be shared with people of specific group or role. You can simple create sharing rules for each continent and share according to business requirement.
Continue reading “Sharing Rules in Salesforce”Consider a scenario where security setting is too restrictive in your org. If there is a need to share some specific record with only couple of users or group and that too for one time sharing, instead of changing OWD setting or profile level setting or creating a permission set you can share those records manually directly from records detail page.
Continue reading “Manual Sharing in Salesforce”An organization where there are many employees, each employee is designated with a specific designation or role. Many employees report to a person who is above their designation. Like in a IT industry where we have designations like, Software Engineer, Senior Software Engineer, Module Lead, Tech Lead, Manager, Director etc. Where Software Engineer and Senior Software Engineer will report to a Module Lead or Tech Lead. Similarly Module Lead and Tech Lead will report to Manager and so on.
Let us assume that in your organization you have multiple users, let us say few are assigned to Marketing Agent Profile, some assigned to Marketing officers Profile. Marketing Agent Profile is more restricted compared to Marketing officers Profile. You know that there is a user who is in Marketing Agent’s profile who is performing better, and you want to assign him some additional permissions.
Permission sets have similar options that are in profiles, then question is why permission set when we have profiles. 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. You can create a permission set, give those additional access in that permission set and assign it to users who needs those additional options.
Continue reading “Permission Sets in Salesforce.”There are ample options in profiles in salesforce. In this post I will discuss about different options with which you can secure data (only, not all options) from different users.
With OWD, you can decide who can view, edit the record and who cannot. I will try to explain you how profiles can be helpful in sharing records and its permission.
But first let’s see how you can reach profiles.
Step 1: Login into your Salesforce Org.
Step 2: In Quick Search type “Profiles”, Select Profiles option.
You will see list of all profiles that are available in System. Both Standard profiles and Custom profiles.
Here you can see a column named Custom, you can differentiate between Standard and Custom by the checkbox field. If check box is unchecked, its standard profile and if check box is checked, its custom profile.
There are limited standard profiles, predefined by salesforce. You can create custom profiles and assign permission as per business requirement. In this post we will only discuss about different options to secure data.
To secure data through profiles there are multiple options.