Skip to main content

Posts

Showing posts from October, 2019

Relationship In Salesforce

Relationship In Salesforce 1. Master-detail relationship 2. Lookup relationship 3. Self-relationship 4. External lookup relationship 5. Indirect lookup relationship 6. Many-to-many relationship (junction object) 7. Hierarchical relationship Master-detail relationship It is a strongly coupled relationship among Salesforce objects, which means if a master record gets deleted, then the child records associated with it are also deleted. In this type of relationship, the parent record controls the behavior of the child record regarding visibility and sharing . It means the security setting of a parent object applies to the child object. When there is a master-detail relationship between two objects, you can create a unique type of field over the master object, called  Roll-up summary . A roll-up summary field allows us to calculate values from child records, such as the number of child records linked to a parent record. Lookup relationship It is a loosely coupled relations

Salesforce Platform features (MVC pattern)

A  controller  can send commands to its associated view to change the view’s presentation of the model (e.g., by scrolling through a document). It can also send commands to the model to update the model’s state (e.g., editing a document). A  model  notifies its associated views and controllers when there has been a change in its state. This notification allows the views to produce updated output, and the controllers to change the available set of commands. A  view  requests from the model the information that it needs to generate an output representation. Some Examples: 1. Visual Force pages, Page Layouts, Tabs comes under View Layer of Model View controller . 2. Workflows, Apex Classes, Triggers, Validation Rules comes under Controller part in Model View controller . 3. Objects, Fields, Relationships comes under Model Layer of Model View Controller .

VS Code And Salesforce CLI Setup

Download VS Code From the Below Link For Windows : Windows x64   For Mac :    macOS For Linux :   Linux x64 .deb Install the Salesforce CLI  You install the Salesforce CLI Download the .pkg file. Double-click the .pkg file. Verify Your Installation Verify your Salesforce CLI installation and plug-in versions. Run this command to verify the Salesforce CLI version:  sfdx --version Salesforce Extension Pack Install the Salesforce Extension Pack in VS Code : INSTALL

Lightning Web Component

Avoid Using Server side Call(Apex Class) using  lightning/uiRecordApi . For Toast in LWC use lightning/platformShowToastEvent. Example : import OBJECT from '@salesforce/schema/ObjectAPIName'; import NAME_FIELD from '@salesforce/schema/ObjectAPIName.FieldAPIName'; ObjectAPIName can be Account/Contact/CustomObject__c FieldAPIName can be Name (FieldAPIName). Lwc_DemoComponent.js: import  {  LightningElement ,  track }  from   'lwc' ; import  {  createRecord  }  from   'lightning/uiRecordApi' ; import  {  ShowToastEvent  }  from   'lightning/platformShowToastEvent' ; import   OBJECT   from   '@salesforce/schema/ObjectAPIName' ; import   NAME_FIELD   from   '@salesforce/schema/ObjectAPIName.FieldAPIName' ; export   default   class   Lwc_DemoComponent   extends   LightningElement  {      isActive  =  true ;     @ track   groupId ;       name  =  '' ;      handleNameChange ( event ) {          this . groupId  =  undefined ;

Translate