Posts

Showing posts with the label salesforce

Understanding Purchase Orders: Process, Types, and Real-Life Examples

Image
What is Purchase Order? A Purchase Order (PO) is a formal, legally binding document issued by the buyer to the seller , indicating the intention to purchase specific goods or services under agreed terms. It includes: Product/service details Quantities Prices Delivery date Payment terms Steps: 1. Requirement Identified The buyer identifies the need for certain goods/services. 2. Buyer Prepares a Purchase Order The buyer fills out a PO with: Items needed Quantities Prices (usually based on a prior Quote ) Shipping info Terms and conditions 3. Buyer Signs and Sends the PO to Seller The PO is signed (physically or digitally). It's sent via email, EDI (electronic data interchange), or procurement platform (e.g., SAP Ariba, Coupa). 4. Seller Reviews the PO The seller verifies the PO details. If everything looks good, the seller accepts the PO. NOTE: In many cases, the seller doesn’t need to physically sign — an email confirmation or acceptance in a system is sufficient. 5. PO Become...

Understanding the Salesforce Approval Process: A Step-by-Step Guide

Image
The Approval Process in Salesforce is an automated sequence of steps where a record is reviewed and approved (or rejected) by designated users based on predefined conditions. This ensures compliance, proper authorization, and consistency in business operations. Key Objects of an Approval Process 1. ProcessNode (Approval Step Definition) (04b) Defines the approval steps in a process. SELECT Id, Name, DeveloperName, ProcessDefinitionId, Description FROM ProcessNode 2. ProcessInstance (Approval Request) (04g) Created when a record is submitted for approval. Stores the current status and progress of the approval process for that record. Acts like a snapshot, tracking where the approval stands at any given moment. SELECT Id, ProcessDefinitionId, TargetObjectId, Status, CompletedDate, LastActorId FROM ProcessInstance 3. ProcessInstanceHistory  Keeps a record of all actions (audit trails) taken on a specific approval process instance. Logs approvals, rejections, reassignments, and recall...

Headless action button using LWC (No Modals)

Image
  A headless quick action executes custom code in a Lightning web component. Unlike a screen action, a headless action doesn’t open a modal window. Expose invoke() as a public method for headless quick actions; the invoke() method executes every time the quick action is triggered. Return type of invoke() is void . Using async will make invoke()  execute asynchronously.  // js file import { LightningElement, api } from 'lwc'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; export default class DispatchEventHeadlessAction extends LightningElement {     @api recordId;      isExecuting = false;     @api async invoke() {           if (this.isExecuting) {           // This code uses a boolean flag to block a double execution            return;          }           this.isExecuting ...

Keyboard Shortcuts for salesforce developer console

Image
Ctrl + E Open the Execute Anonymous Window. Ctrl + O Open files. Ctrl + Shift + a Open Lightning Resources Ctrl + Shift + h Search in files Ctrl + ALT + / Close all tabs Ctrl + , Navigate backward through the view history Ctrl + . Navigate forward through the view history

Communication between unrelated components using LMS in salesforce

Image
Communication between unrelated components in salesforce using  Lightning Message Service (LMS) LMS is a publish and subscribe service that facilitates communication between Lightning web components, Aura components, and Visualforce pages.
 Step1: Create a Lightning Message Channel Create a folder named “messageChannels” under force-app/main/default Create a file under the "messageChannels" folder with the name <channel>.messageChannel-meta.xml Example: <?xml version="1.0" encoding="UTF-8" ?> <LightningMessageChannel xmlns="http://soap.sforce.com/2006/04/metadata">     <masterLabel>CountUpdated</masterLabel>     <isExposed>true</isExposed>     <description>Message Channel to pass Count updates</description>      <lightningMessageFields>         <fieldName>operator</fieldName>         <description>This is the operator type...