This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ContactTrigger | |
* | |
* This trigger handles after-update operations on the Contact object. | |
* It delegates the processing logic to the `ContactTriggerHandler` class to ensure a clean separation of concerns. | |
* | |
* Trigger Context: | |
* - Executes in the after-update context. | |
* | |
* Key Features: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Case Trigger Without Recursion | |
/** | |
* CaseTrigger | |
* | |
* This trigger is executed after the update event on the Case object. Its purpose is to: | |
* - Monitor changes to the Case's Status field. | |
* - If the Status changes to 'Escalated': | |
* - Retrieve the associated Contact record linked to the Case. | |
* - If the Contact's Title is not already 'Manager', update it to 'Manager'. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Case Trigger With Recursion | |
/** | |
* CaseTrigger | |
* | |
* This trigger is executed after the update event on the Case object. Its primary purpose | |
* is to check if any Case record has been escalated (Status = 'Escalated') and update the | |
* associated Contact's Title to 'Manager' if it is not already set to 'Manager'. | |
* | |
* Note: This implementation directly queries and updates the Contact records. | |
* Care should be taken to ensure compliance with Salesforce Governor Limits, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Opportunity Trigger with Recursion Fix | |
/** | |
* OpportunityTrigger | |
* | |
* This trigger is responsible for handling "before update" and "after insert" events | |
* on the Opportunity object. It delegates the logic to a handler class (OpportunityTriggerHandler) | |
* while utilizing a utility class (TriggerUtility) to prevent recursive execution. | |
*/ | |
trigger OpportunityTrigger on Opportunity (before update, after insert) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Opportunity Trigger With Recursion | |
/** | |
* OpportunityTrigger | |
* | |
* This trigger is responsible for handling "before update" and "after insert" events | |
* on the Opportunity object. It directly contains the logic for updating specific | |
* fields based on conditions, ensuring proper data updates during these events. | |
* | |
* Note: This trigger does not use a handler class or utility class for recursion control. | |
* Instead, it executes the logic inline, which might lead to recursion issues in certain scenarios. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--leafletMap.html--> | |
<template> | |
<div class="container" lwc:dom = "manual"></div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--simplePluginLwc.html--> | |
<template> | |
<lightning-card title="Plugin Load From External Script Example – LWC" icon-name="custom:custom14"> | |
</lightning-card> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--myvfpage.html--> | |
<!-- Define a Visualforce page with specific settings: | |
- `showHeader="false"`: Hides the Salesforce header. | |
- `standardStylesheets="false"`: Disables the default Salesforce stylesheets. | |
- `sidebar="false"`: Removes the sidebar. | |
- `applyHtmlTag="false"`: Prevents Salesforce from adding an automatic <html> tag. | |
- `applyBodyTag="false"`: Prevents Salesforce from adding an automatic <body> tag. | |
- `docType="html-5.0"`: Specifies the HTML5 doctype for modern web standards. --> | |
<apex:page showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--myLwcComponent.html--> | |
<template> | |
<lightning-card title="LWC called in VF Page via Lightning Out Component" icon-name="custom:custom14"> | |
<div class="slds-p-around_medium"> | |
<button onclick={handleClick}>Call Utility Method</button> | |
</div> | |
</lightning-card> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--myLwcComponent.html--> | |
<template> | |
<lightning-card title="LWC called in VF Page via Lightning Out Component" icon-name="custom:custom14"> | |
<div class="slds-p-around_medium"> | |
<p>This is a sample component for learning How to display LWC in Visualforce Page. You can customize it as needed.</p> | |
</div> | |
</lightning-card> | |
</template> |