Q: Write push and pop nodes using Linked List data structure.
Salesforce Developer Manager Interview Questions
5,283 salesforce developer manager interview questions shared by candidates
Write a Salesforce trigger to accomplish a task in this text editor window.
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; } }
What happens when workflow action triggers an email alert to invalid email recipient?
Typical HR questions like why do you want to work for us?
What are different services from salesforce?
What is salesforce
Written test 2 technical rounds about salesforce crm and some basic questions
Savoir présenter son parcours et donner les raisons pour lesquelles on souhaite rejoindre la société
Tell me your Project Experience
Viewing 3321 - 3330 interview questions