Sometimes we have Requirement to have a number of Counts of Contact on Account, just like Rollup Field Salesforce. But Salesforce has provided Rollup Summary Field on the Master-Detail Object. Below is Sample code for the Same. Apex Trigger : trigger trgContactTrigger on Contact (before insert, after insert, before update,after update,after Delete) { ContactTriggerHandler objClass … Continue reading Custom Roll up With Apex Trigger.
Create JSON using apex
JSON Stands for JavaScript Object Notation. Creating JSON in Apex is not a Big Deal. If it's just about serializing an object, the JSON class will be enough by itself. Below is the Query that we can run from Execute Annoynmous block and check the output. System.debug(JSON.serialize( [Select Id from Account limit 1] )); [{"attributes":{"type":"Account","url":"/services/data/v40.0/sobjects/Account/0010O00001kzzCtQAI"},"Id":"0010O00001kzzCtQAI"}] … Continue reading Create JSON using apex
How to use Custom Label in Process Builder?
Custom labels are custom text values that can be accessed from Apex, Visual Workflow, Process Builder, and so on. The values can be translated into any language that Salesforce supports. You can create up to 5,000 custom labels in an organization, and they can be up to 1,000 characters in length. If we talk about Best Practices Salesforce never Supports Hard Coded IDs. So at that point of Time … Continue reading How to use Custom Label in Process Builder?
Call Apex Through Process Builder
So today I will post how to call apex Class through Process Builder. Sometimes there is a requirement when we need to apex class through Process Builder. Apex Class : Public class InvokeClassThroughProcessbuilder { @InvocableMethod(label='Get Lead Name') Public static void LeadUpdatefromProcessBuilder(List <ID> LeadIds ){ Set<Id> leadId= new Set<Id>(); leadId.addAll(LeadIds); List< Lead > leadtoUpddate = new … Continue reading Call Apex Through Process Builder
How to Resolve Iframe Scroll issue for PDF in Lightning for IPAD in Salesforce 1?
So I had one of the Requirements where I had to generate PDF through VF page and Open that on Click of Quick action. But I was facing an issue that scroll for the PDF was not Working. My PDF had 4 pages and In case of IPAD, the scroll was not working. After trying … Continue reading How to Resolve Iframe Scroll issue for PDF in Lightning for IPAD in Salesforce 1?
You must be logged in to post a comment.