Showing posts with label Apex. Show all posts
Showing posts with label Apex. Show all posts

Bypass Apex Trigger using Custom Permission - Apex Basic | Salesforce Funda



Custom Permissions let you define access checks that can be assigned to users via permission sets or profiles, similar to how you assign user permissions and other access settings

A custom permission is a specific attribute added to a Permission Set. This attribute allows you to apply a specific logic to any user being assigned this permission set.

Wrapper Class Example Using Visualforce Salesforce 5 - Apex Basic | Visualforce Basic - Salesforce Funda



User Case :- we have user case we need to display all account Information with primitive data types Boolean as isSelected variable as Checkbox, we can Select Some Account in different Datatable and then again i can select some account from  there if we click on the check box it will show the related Contact Details and Opportunity Details in the output section, and if contact is not present for the selected Accounts it will show the Message as "No Contact Available" "No Opportunity Available"  so we will use wrapper class in apex and try to get all the data to visualforce 

What is SOQL FIELDS() Functions in Salesforce - SOQL Basic | Salesforce Funda

Salesforce has introduced SOQL Fields functions. This new function lets us query all the Salesforce fields of the object, Before you would have to add various fields api names to the select to get their values

You can include any of these in the field list:

  • FIELDS(ALL) — select all the fields of an object.
  • FIELDS(CUSTOM) — select all the custom fields of an object.
  • FIELDS(STANDARD) — select all the standard fields of an object

Wrapper Class Example Using Visualforce Salesforce 4 - Apex Basic | Visualforce Basic - Salesforce Funda

 


User Case :- we have user case we need to display all account Information with primitive data types Boolean as isSelected variable as Checkbox, there if we click on the check box it will show the related Contact Details and Opportunity Details in the output section, and if contact is not present for the selected Accounts it will show the Message as "No Contact Available" "No Opportunity Available"   so we will use wrapper class in apex and try to get all the data to visualforce 

Wrapper Class Example Using Visualforce Salesforce 3 - Apex Basic | Visualforce Basic - Salesforce Funda


User Case :- we have user case we need to display all account Information with primitive data types Boolean as isSelected variable as Checkbox, there if we click on the check box it will show the related Contact Details in the output section, and if contact is not present for the selected Accounts it will show the Message as "No Contact Available"  so we will use wrapper class in apex and try to get all the data to visualforce 

Wrapper Class Example Using Visualforce Salesforce 2 - Apex Basic | Visualforce Basic - Salesforce Funda

      

User Case :- we have user case we need to display all account Information with primitive data types Boolean as isSelected variable as Checkbox, there if we click on the check box it will show the related Contact Details in the output section, so we will use wrapper class in apex and try to get all the data to visualforce 

Wrapper Class Example Using Visualforce Salesforce - Apex Basic | Visualforce Basic - Salesforce Funda



User Case :- we have user case we need to display all account Information with primitive data types Boolean as isSelected variable as Checkbox, so we will use wrapper class in apex and try to get all the data to visualforce 

What is Wrapper Class in Salesforce - Apex Basic | Salesforce Funda



Wrapper Class is a class within a class that stores a group of different or similar data type/Sobject values into a single object.
In other words, it is a collection of data members only without methods or user-defined data types.

What is Polymorphic Relationships(POLYMORPHIC FIELDS) in SOQL Queries - SOQL Basic | Salesforce Funda

 A polymorphic relationship is a relationship between objects where a referenced object can be one of several different types. For example, the Who relationship field of a Task can be a Contact or a Lead.

You can use SOQL queries that reference polymorphic fields in Apex to get results that depend on the object type referenced by the polymorphic field. 


One approach is to filter your results using the Type qualifier. 

Advanced SOQL Statements - FOR VIEW, FOR REFERENCE, UPDATE VIEWSTAT, FOR UPDATE, ALL ROWS - SOQL Basic | Salesforce Funda


FOR VIEW :  This is used to fetch records from last day fetched records.

FOR REFERENCE : To update LastReferencedDate this is used.

SOQL Relationships - Parent to Child SOQL | Child to Parent SOQL for Standard and Custom Object - SOQL Basic | Salesforce Funda

SOQL allows you to query and retrieve data from Salesforce objects and their relationships. SOQL Relationships between objects are mainly used to query the records from one or more objects in a single SOQL statement in salesforce.com

These queries are used to fetch data either from the Parent object when the SOQL query is written on the child, or from the child object when the SOQL query is written on the parent

SOQL Group By or GROUP BY ROLLUP Clause - SOQL Basic | Salesforce Funda

You can use the GROUP BY option in a SOQL query to avoid iterating through individual query results. That is, you specify a group of records instead of processing many individual records.

GROUP BY clause is used in SOQL query to group set of records by the values specified in the field. We can perform aggregate functions using GROUP BY clause.

Both GROUP BY and GROUP BY ROLLUP Clause are similar to each other but IN SOQL GROUP BY ROLLUP Clause returns multiple levels of subtotal rows. 

When we using GROUP BY ROLLUP Clause in a statement we can add up to three fields in a comma-separated list.

What is an escape sequence ? - SOQL Basic | Salesforce Funda

 SOQL defines several escape sequences that are valid in queries so that you can include special characters in your queries. You can escape new lines, carriage returns, tabs, quotes, and more. The escape character for SOQL is the backslash (\) character.


SOQL Date Literals and Date Formats - SOQL basic | Salesforce funda

 When SOQL statements we should follow some date formats which are predefined in salesforce. You can specify date values or date literals in WHERE clauses to filter SOQL query results. Dates represent a specific day or time, while date literals represent a relative range of time, such as last month, this week, or next year.

SOQL Logical and Comparison Operators - SOQL Basics | Salesforce Funda

 Comparison operators in SOQL are used to compare a value with another value to return TRUE or FALSE.


What is SOQL ? Types of SOQL - SOQL Basics | Salesforce Funda

 SOQL term as Salesforce Object Query language, This is Salesforce Object Query Language designed to work with SFDC Database. 



SOQL(Salesforce Object Query Language) is used to query the records from the database based on the requirement.  It can search a record on a given criterion only in single sObject.

Filtering records :- Where, LIKE, IN, NOT IN, INCLUDES, EXCLUDES, Semi-Joins with IN and Anti-Joins with NOT IN, ORDER BY, GROUP BY, OFFSET in Salesforce SOQL - SOQL Basic | Salesforce Funda

 



Filtering records with various operators let's check all one by one Where, LIKE, IN, NOT IN, INCLUDES, EXCLUDES, Semi-Joins with IN and Anti-Joins with NOT IN, ORDER BY, GROUP BY, OFFSET

Salesforce Rest API Dispatcher - Implementing different endpoints in same rest Api class | Salesforce Funda

Basically salesforce have limitation of having only one type of method like (Get, Post) in one class so we can't use more than get one method in apex class so we have one work around in order to use multiple get method in one apex class

API Dispatcher flow