Skip to main content


Showing posts from 2020

Working on Process Builder and Flow with Effiency

It's long therefore I split it to different module that you can click instead of scroll, Problem statement Current Implementation Improved Implementation Problem statement I was working on requirement which involving on after trigger update and suddenly have to stop when I hit governer limit in Process Builder that not related to the current changes. Too many SOQL queries: 101 Usually when I got this type of error I will worry and start looking into my code which is not wrong approach at all. However it is good to start with the Process Builder that hinting the exception although the changes that we are working on seem like not relevant. Actually it is relevant when it involves process builder , flow , trigger and workflow (everything that involve DML) Let say that is current data model , please ignore the sense of  object name, field name as I just renamed it from actual name. Pay attention on the relationship. Product Proposal is a parent object of

Add event in LWC and Listen in Visualforce page

While reading this, you might have an idea how it should works and why ? In order to make it easy, I narrow down problem statement so I can write simple, short solution for future reference. All comments, ideas except spams are welcome. Problem Statement I have LWC which is embedded inside Aura and Aura is embedded inside Visualforce page. Why I come out with such design ? Due to that I am not able to use the cool NavigationMixin for redirection Now how do I redirect page ? Solution  Adding create event in LWC and add the listener to visualforce page Technical Implementation In LWC javascript , create event on function that handles redirection. For example maybe you want user to go to different page when the button is clicked. //function to redirect to opportunity detail handleOnOppLink (){ this . showLoadingSpinner = false ; //create new Event with any meaningful name, in my case 'redirectFromLWC' this . dispatchEvent ( n

Retrieve related id / parent id in Aura component when override standard New button

Currently this is not possible , please vote the idea Get parentId when overriding standard actions with a lightning components This currently doable by overriding New button using  Visualforce page. So we can retrieve Parent Id or any record field in Visualforce page and pass it to the Aura component.The workaround that works is by wrapping it inside Visualforce page. Basically it is the same for both Aura and LWC but I still put it here for my reference Example for Aura component < apex : page standardController = "MyObject" > < apex : includeLightning /> < div id = "lightning" /> < script > $Lightning.use( "c:lightApp" , function () { $Lightning.createComponent( "c:lightComp" , { opportunityId : "{!MyObject.Opportunity__c}" }, /*** here my parentId***/ "lightning" , function (cmp) { // do s

Custom Metadata Retrieve and Deploy

Some of error while uploading CustomMetadata record . Version 47 3. package . xml (Sync_Mapping__mdt . Quote_Related_Framework) -- Error: An object 'Sync_Mapping__mdt.Quote_Related_Framework' of type CustomMetadata was named in package . xml, but was not found in zipped directory 4. package . xml (Sync_Mapping__mdt . Quote_Levy) -- Error: An object 'Sync_Mapping __mdt . Quote_Levy ' of type CustomMetadata was named in package.xml, but was not f ound in zipped directory Can be fixed using this : <?xml version="1.0" encoding="UTF-8"?> <Package xmlns= "" > <types> <members> Sync_Mapping.Bid_Related_Framework </members> <members> Sync_Mapping.Bid_Levy </members> <members> Sync_Mapping.Quote_Related_Framework </members> <members> Sync_Mapping.Quote_Levy </members> <