Fun with Trigger -3 | Update Child field with some Parent field when Child record get updated/Created | Prevent Class From Recursion
Salesforce Hut
by
2y ago
 In this post we will update Contact department field with Account Industry if Contact Lead Source is 'other'. As we are updating contact again so it will cause recursion so to avoid that we have applied RECURSIVE Check. The class to check recursive is also included in this post ..read more
Visit website
Fun with Trigger -2 | Update Parent field From Child Aggregate (Count/Sum/Avg) when Child record get updated/Created
Salesforce Hut
by
2y ago
In this post, we have created one custom field Contact size on Account and we will update that contact size field based on insertion/deletion/updating of contact which is related to Account. In other term, we can say Roll-Up Summary through a trigger ..read more
Visit website
Fun with Trigger -1 | Update Child field with some Parent field when Parent record get updated
Salesforce Hut
by
2y ago
  In this post, we will update Contact field Mailing Address with Account Field Billing Address whenever Account billing address change ..read more
Visit website
Salesforce Integration Diagram at a glance
Salesforce Hut
by
3y ago
 Case 1: When we have to do Callout The above diagram shows how data flow from Salesforce to any other system. Where as what we want from system B to integrate with our Salesforce system. Case 2: When we have to receive data from System B and exposing our web service class and URL The above diagram represents when data is coming from any other system in the form of JSON/XML and where salesforce is the target/receiver. In this we have to create connected app and needs to provide the credentials, username, passwords etc to System B ..read more
Visit website
Parent Child Relations using Map | How to fetch all Child Value from Parent Object | Example Of Roll Up Summary
Salesforce Hut
by
3y ago
  In this post, we will see how to establish Parent-Child relations using Map in Salesforce. By this method, you can easily find all the child values its sizes etc that is associated with its Parent record.  After that, we will also see the small example where there is a Trigger on contact and which will give the size of Contact on Account object. Example For Roll-Up Summary using Above Relation ..read more
Visit website
OOPs in Salesforce with Real World comparison
Salesforce Hut
by
3y ago
  What is OOPs Object-oriented programming is a programming paradigm based on the concept of "objects", which can contain data, in the form of fields, and code, in the form of procedures. It allows users to create the objects that they want and then create methods to handle those objects.  The OOPs that we deal in Apex are: Object Class Inheritance Polymorphism Abstraction Encapsulation Object Real World: - Any entity that has state and behavior is known as an object. It can be physical and logical. eg:- Car, bike, book, ball, etc. Technical: An object can be defined as an insta ..read more
Visit website
Future method in Salesforce with some example
Salesforce Hut
by
3y ago
Definition - Future Apex is used to run processes in a separate thread, at a later time when system resources become available Benefits Some governor limits are higher, like SOQL query and heap size limits. Prevent mixed DML error. The process runs in the background, asynchronously. Important Points A future method must be a static method. It only returns void type. The future method can’t take object and sObjects as parameters. Parameters must be primitive data types like arrays of primitive data types, or collections of primitives data types. Future methods can’t invoke another fu ..read more
Visit website
Integration using REST API fetching record details from target org and display in source org using lightning component
Salesforce Hut
by
3y ago
  In this post we are Integrating one Salesforce Org (Org A) to another Salesforce Org (Org B), in which we will fetch Account details from Target org by passing account number. Before writing code you need to do some settings as mentioned below: Org A (Source Org) You need to set the endpoint URL of Target Org in the Remote Site setting (setup >> Remote Site Setting). Then you need to write a) API Class. b) Lightning Component to show details Org B (Target Org) Create a connected app (please refer image below) and obtain clientId, clientSecret, username, password (a c ..read more
Visit website
Integrating One Salesforce Org to Another Org Using REST API And Creating Records In Other Org
Salesforce Hut
by
3y ago
  In this post we are Integrating one Salesforce Org (Org A) to another Salesforce Org (Org B), in which If a record is created in Org A it will automatically create in Org B. Before writing code you need to do some settings as mentioned below: Org A (Source Org) You need to set the endpoint URL of Target Org in the Remote Site setting (setup >> Remote Site Setting). Then you will write the a) Future callout class. b) Trigger which call Future Class on Insertion Org B (Target Org) Create a connected app (please refer image below) and obtain clientId, clientSecret, usernam ..read more
Visit website
How to send JSON through Future Callout with Test Class
Salesforce Hut
by
3y ago
  In this post, we will see how to create JSON through JSON Generator and send it through Future callout.  This program has 2 methods. First method create JSON of Case and its related Account, Asset and CaseComments with JSONGenerator. Second method takes the JSON and callout to the desired endpoint URL. As this is separated in 2 methods because if the first method has DML operation then it should be complete first to call the Future method. Note: Please make Remote Site URL in your Org ..read more
Visit website

Follow Salesforce Hut on FeedSpot

Continue with Google
Continue with Apple
OR