Posts

Change Owner / Update record using Lightning Custom Button Salesforce

Image
This post is related to changes the Owner or update the record from detail page in lightning. Actually we have standard button to change the owner of the record but when we click on the lighting button it will populate the popup and ask for user to change. But here the requirement is change the logged in user direcly when we click on the button. So here we created Custom lightning component with custom Quick action to complete this task. Standard Change Owner in Lightning In classic saleforce we used custom javascript buttons to execute the functionalites but lighting not support the javascript so here we created custom component with Quick action and added in the pagelayout so we can see it in lighting.and add the button in "Salesforce Mobile and Lightning Experience Actions" section. Add caption Lightning Button Pagelayout Change owner Lightning Button  <!--change owner lighting Component --> Component Name : changeowner.cmp <aura

Salesforce Data migration/Data Consolidation Tricks & Tips

Image
1) Change System TimeZone to UTC. Rightclick on date and time and click on Adjust date/time.in Time Zone select UTC Coordinated Universel time. Adjust date/time for salesforce data migration Adjust date/time for salesforce data migration 2) Update your dataloader time zone as GMT. Salesforce dataloader time Zone  3) Change time zone in salesforce user org to GMT+00:00 Greenwhich mean time GMT 4) While Exporting Data use UTF-8 to avoid special characters. 5) Always Use CSV file format to export and load the data. 6) While loading data keep short date system (yyyy-dd-mm)format in excel. 7) Save files with version names ex : samplefile_v1.csv 8) Turnoff Email Deliverabilities while loading data. 9) Check Field mapping in dataloader and save mapping file (slds) for feature use. 10) Check some records/data manually after load. 11) Store previous record id in any external unique field. 12 ) Learn vlookup in Microsoft excel, i will useful for Mapping

Salesforce Lightning Design System - SLDS

Image
Salesforce Lightning Design System :  Salesforce has 2 desktop user interface. 1) Salesforce classic 2) Lightning Experience Salesforce lightning Design System use to design responsive webpages compatable to all the devices. we know the Salesforce classic very well because we already working from long back.Now we will learn about what is Lightning Experience in Salesforce. Lightning Experience is a easy way to Design application userinterface and develop the functionality. it is completely modern way of designing. What we are doing in salesforce Classic, we can do it in salesforce lightning. but everyone thinking why we need to switch to Lightning ??? 1) We can track sales, services easily and close deals fastly. 2) More user friendly design using SLDS. 3) Less Design and Development Efforts. Lightning design system Salesforce lightning Design System helps to desing beautiful and powerful user friendly applications.It helps to build applications easily. We ca

Salesforce Classic to Lightning Intergration / Lightning Out Salesforce:

Image
What is the use of Lightning Out Salesforce ? Lightning Out is used to add lighting components into the Visualforce Page.it is a flexible and powerful feature provided by salesforce to embeded Lighting components into the any Web page. Once we embed lighting component in any visualforce page/ visualforce component we can see lightning component features in any webpage.this is possible by using lighting Out.we can display lightning component errors/exceptions also in visualforce pages. Is it possible to display ligtning component exceptions/errors in visualforce page ? Yes Is Lightning Out is a iframe ? No Where We can i Use Lighting Out ? Classic / Salesforce1 / Lightning Experience What are steps to create Lightning Out Functionality ? 1) Include <apex:includeLightning/> in the Visualforce to add Lightning components for visualforce javascript library.(Include it in begining of the page) 2) Create lightning application and include it in lighting Use.This is

Execute logic based on logged in Usertype Standard or Community Portal User

If we want to execute the logic particular to the Usertype we can use UserInfo.getUserType.There are different usertypes in salesforce. 1) Standard 2) PowerPartner 3) CSPLitePortal 4) CustomerSuccess 5) PowerCustomerSuccess 6) CsnOnly if(UserInfo.getUserType()=='CspLitePortal' || UserInfo.getUserType()=='PowerCustomerSuccess' || UserInfo.getUserType()=='Standard'){   // Logic } Reference : https://salesforce.stackexchange.com/questions/3889/what-are-the-possible-options-for-usertype

Salesforce Ant Package.xml Metadata Types

package.xml file used to retrieve metadata using ANT from salesforce sandbox. <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata">     <!--Apex Classes-->     <types>         <members>*</members>         <name>ApexClass</name>     </types> <!--Apex Component--> <types>         <members>*</members>         <name>ApexComponent</name>     </types> <!-- Apex Page --> <types>         <members>*</members>         <name>ApexPage</name>     </types> <!-- Custom Application-->     <types>         <members>*</members>         <name>CustomApplication</name>     </types> <!-- Custom tab --> <types>         <members>Employee__c</members>         <name>CustomTab</name>     </t

Salesforce Regex Validation Rule in International Format

Image
Create validation rule on phone or mobile field on any Account or Contact object on salesforce.Then it will check for whether phone number is given as empty or given in proper format or not. NOT(REGEX( Phone , "^\\s*(?:\\+?(\\//*|\\d{1,3}))?([-. (\\d*]*(\\d{3})[-. )]*)?((\\d{3})[-. ]*(\\d{2,4})(?:[-.x ]*(\\d+))(?:\\s*(?:#|\\//*|\\\\|,|-| |x|\\|.?|ext\\.?|extension\\.?|\\*)*([-. \\//\\\\(\\d*]*(\\d{1,4})[-. )]*)\\s*(\\d|#+))?)\\s*$")) Useful Link : https://help.salesforce.com/articleView?id=000181563&language=en_US&type=1 Account Validation rule

Script to delete multiple records using Apex salesforce

Delete multiple records from salesforce anonymous block using some script.find the below script just paste the script in the anonymous vlock and select the code and click on Execute Highlighted. Before that if any conditions need to check add it in SOQL Query or if condition then it will filter the records and delete the records. If there are more records we have to run this script multiple times .if we try to delete all the records at a time we might get the DML and limit exceptions.so adding limit in SOQL query and executing. Example :  Object : ABC__c Fields : field1__c, field2__c list<ABC__c> abclist = new list<ABC__c>(); List<ABC__c > alltldroles = [SELECT id,name,field1__c,field2__c                              FROM ABC__c LIMIT 1000]; if(alltldroles.size()>0){     for(ABC__c tldroleslist : alltldroles) {          if(tldroleslist.field1__c != null && tldroleslist.field2__c!=null )  {           abclist.add(tldroleslist);       }

Steelbrick CPQ Quote Template Notes

Image
Creating Quote is a very important functionality in the CPQ Steelbrick. Quote consist of number of products ordered and cost of the products.Steelbrick provided option to customize the template. Steelbrick provided below features to customize templates : An HTML toolbar that is used to edit and format the template. Template sections that is used to control display order of the sections. We can Repeat header and footer Visualforce inclusions for your custom code The template editor consists of two primary layout components: Sections : Blocks of information that contain one or more pieces of template content. Examples include Template Top, Line Items, and Template Bottom. Content : The actual quote-specific information that is stored within a given section. For example, the Template Top Section could contain the Prepared For, Prepared By, Quote #, Date, Expires On, Contract Start, and Contract End Content. Find the below Sample Quote. Steelbrick CPQ Quote Template

Salesforce CPQ Release Notes

Image
Salesforce released Steelbrick CPQ latest version Winter 18. Please find the below Updates. CPQ-Steelbrick-winter18-p5 CPQ-Steelbrick-winter18-updates-p6 CPQ-Steelbrick-winter18-updates-p7 CPQ-Steelbrick-winter18-updates-p8 CPQ-Steelbrick-winter18-updates-p9 CPQ-Steelbrick-winter18-updates-p10 CPQ-Steelbrick-winter18-updates-p11 CPQ-Steelbrick-winter18-updates-p12 CPQ-Steelbrick-winter18-updates-p13