# Quote Form WorkSheet Events **Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5) **Created:** 2016-09-29 15:24 UTC **Views:** 2539 **Replies:** 9 **URL:** https://www.epiusers.help/t/quote-form-worksheet-events/35639 --- ## Post #1 by @Mel We are on version 10.1.400.13 and are in the process of customizing the Quote Form Worksheet tab. I added 4 user defined fields that sums up and saves the total as the Misc Cost. How do I recalculate the worksheet with the new cost? Also, how do I find all the events used on the worksheet? Does anyone have any code they could share? Thanks in advance, Mel --- ## Post #2 by @Manasa When you say events are you talking about the business objects used? If so, you can enable tracing. This is under the main Epicor screen, under Tracing Options…enable it and then go back to the worksheet and do a mock quote….this will show you all objects used at each step. Manasa --- ## Post #3 by @Manasa Clarification --> Main Epicor Screen --> Options --> Tracing options Manasa --- ## Post #4 by @Mel Hey Manasa, I found one called CallQuoteAdapterRecalcWorkSheetMethod(). Is there a definition somewhere on what it does and how to use it? Say for example I enter a material profit percentage and tab from that field. When I hit tab the cost is updated. What event or business object triggered the update? Thanks Mel --- ## Post #5 by @Manasa Yeah, that is where I fall short….hopefully someone else reading this can answer that question. Guys? M. Manasa Reddy P: 703.471.7145 x454 manasa@euclidsys.com --- ## Post #6 by @hkeric.wci // You could do it this way BO ((Erp.Proxy.BO.QuoteImpl)this.oTrans.PrimaryAdapter.BusinessObject).RecalcWorksheet(oTrans.currentQuoteNum(), , , oTrans.QuoteData); // You could do it this way AD - Add QuoteAdapter to your Assemblies ((Erp.Adapters.QuoteAdapter)this.oTrans.PrimaryAdapter).RecalcWorksheet(oTrans.currentQuoteNum(), , ); _Just replace the insertQuoteNum and insertQtyNum with your actual numbers._ --- ## Post #7 by @Mel Haso, I am new to programming in C#. How did you find that adapter? Thanks Mel --- ## Post #8 by @hkeric.wci There are several ways to trigger the Recalculation. Unfortunately Epicor behind the scenes has made some of the useful methods private. In many other entry screens you could simply do this.oTrans.MethodName() yet for some reason the recalcWorksheet is private and has been since E9. // You could do it this way BO ((Erp.Proxy.BO.QuoteImpl)this.oTrans.PrimaryAdapter.BusinessObject).RecalcWorksheet(oTrans.currentQuoteNum(), , , oTrans.QuoteData); // You could do it this way AD - Add QuoteAdapter to your Assemblies ((Erp.Adapters.QuoteAdapter)this.oTrans.PrimaryAdapter).RecalcWorksheet(oTrans.currentQuoteNum(), , ); // You could do it also this way using Reflection and accessing the Quote Transactions private recalcWorksheet method System.Reflection.MethodInfo mi = typeof(Erp.UI.App.QuoteEntry.Transaction).GetMethod("recalcWorksheet", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); mi.Invoke(this.oTrans, new object[] { this.oTrans.currentQuoteNum(), , }); // Also the Worksheet is re-calculated by making any changes via code or UI to fields UnitPrice, DocUnitPrice, BurdenMarkUp, LaborMarkUp, SubcontractMarkUp MtlBurMarkUp, MiscCostMarkUp, MiscCost, CommissionPct... When working with Client Side Customizations it is always best to simply use the Adapter. If you don't want to have to rely on the Assembly you could use the Reflection way. I would suggest in your case, simply use the Adapter version. Why? Because the Adapter often has Warning/Error MessageBoxes that it may trigger, in addition it may call other UI related methods. When you use the Business Object version you have to handle the exception yourself. Example: try { // Do BO Magic } catch (BusinessObjectException ex) { ExceptionBox.Show(ex); } So, let's use the Adapter version. How-to Reference QuoteAdapter: * Go Into **Customization Mode** * **Tools -> Assembly Reference Manager** * Click **Add Custom Reference** * Navigate to your E10 Client (usually C:\epicor\ERP10.1Client\Client) * Select **Erp.Adapters.Quote.dll** Now by using the Adapter snippet above, you should be able to Press **F5** and successfully compile your customization. _**However,**_ if you are already saving the total to QuoteQty.MiscCost then the re-calculation should happen automatically. --- ## Post #9 by @Mel Thank you. Learning on the fly :slight_smile: --- ## Post #10 by @Mel I’m trying to understand why the information on my worksheet is not changing when I have different quantities. I think it’s because I’m defining my rows incorrectly. Here is a small snipet. private EpiDataView edvQuoteQty; edvQuoteQty.CurrentDataRow["MiscCostDesc"] = "Additional Buried Cost"; edvQuoteQty.CurrentDataRow["MiscCost"] = curADDToolingCost.Value+curADDPackagingCost.Value+curADDMiscCost.Value; When would I use the following? oTrans.Update() oTrans.NotifyAll() oTrans.Refresh() I also so a posting where someone used BeginEdit() and EndEdit(). Any help would be appreciated. Thanks Mel --- **Canonical:** https://www.epiusers.help/t/quote-form-worksheet-events/35639 **Original content:** https://www.epiusers.help/t/quote-form-worksheet-events/35639