polymorphism
Salesforce Developer Interview Questions
5,281 salesforce developer interview questions shared by candidates
Q1. "There are three boxes one contains apples, one contains oranges and one contains both apples and orange". You can find the full question on google
Name a time when you dealt with a difficult stakeholder.
How is your experience relative to this position?
What is your experience with Salesforce integrations?
public Class QuoteTriggerHandler{ public static void AfterUpdate(List newQuots, Map oldQuote){ Set OrderReady = new Set(); List ordertoUpdate = new List(); for (Quote qte : newQuots) { if(qte.status!=null && qte.status!= oldQuote.get(qte.Id).status && qte.status=='Order Placed'){ Order o1= new Order(); o1.Quote= qte.id; ordertoUpdate.add(o1); OrderReady.add(qte.id); } } if(!ordertoUpdate.isEmpty()) INSERT as system ordertoUpdate; if(!OrderReady.isEmpty()) processOrderProducts(OrderReady); } @future public static void processOrderProducts(Set quoteIds){ List allOrders =[SELECT Id from Order where Quote in: quoteIds]; List allQuotes =[SELECT Id,(SELECT Id, Startdate, enddate, Quantity from QuoteLines) from Quote where Id in: quoteIds]; Map qteOrderMap= new Map(); for(Order o1: allOrders){ qteOrderMap.put(o1.Quote, o1.id); } List<>OrderProduct> opsToUpdate =new List<>OrderProduct> (); for(Quote quote: allQuotes){ if(!quote.QuoteLines.isEmpty()){ opsToUpdate.addALL(QuoteTriggerHandler.createOrderProducts(quote.QuoteLines);) } } if(!opsToUpdate.isEmpty()) INSERT as system opsToUpdate; } public static List createOrderProducts(List quoteLines){ Map> productQL = new Map> (); for(QuoteLine ql: quoteLines){ if(productQL.containsKey(ql.productName)){ productQL.put(ql.productName, productQL.get(productQL).add(ql)); }else { productQL.put(ql.productName, new List{ql}); } } List<>OrderProduct> ops =new List<>OrderProduct> (); for(String pname: productQL.KeySet()){ list qlines = productQL.get(pname); Date Startdate= qlines[0].Startdate; Date enddate= qlines[0].enddate; Date initialQ =qline[0].Quantity; Date finalQ =qline[0].Quantity; for(Integer i=1; i< qlines.size();i++ ){ if(qlines[i].Startdate < Startdate){ Startdate = qlines[i].Startdate; }else if(lines[i].Startdate = Startdate)){ initialQ +=qline[i].Quantity; } if(qlines[i].enddate > enddate){ enddate = qlines[i].enddate; } finalQ +=qline[i].Quantity; } OrderProduct op =new OrderProduct(); op.Order=qteOrderMap.get(qlines[0].Quote); op.Startdate =Startdate; op.enddate=enddate; op.initialQuantity =initialQ; op.finalQuoantity = finalQ; ops.add(op); } return ops; } }
Write a Salesforce trigger to accomplish a task in this text editor window.
Q: Write push and pop nodes using Linked List data structure.
self introduction and my project details
Write Dynamic SOQL and explain every word you wrote along with the return types.
Viewing 3381 - 3390 interview questions