# Add Operation,Material to a Quote using C# **Category:** [Epicor ERP 9](https://www.epiusers.help/c/e9/7) **Created:** 2016-12-20 20:50 UTC **Views:** 1242 **Replies:** 2 **URL:** https://www.epiusers.help/t/add-operation-material-to-a-quote-using-c/36690 --- ## Post #1 by @griffith I have some custom Data that I have added to the Quote worksheet using a UD table I have all the data added in the UD table and displayed in a Gridview on the Quote form. So once the Estimator is ok with this Data I want to add the Operation,Material and what not to the Quote This is where I start... but get an error: QuoteDataSet QDS=QuoteData.GetByID(qNum); QuoteData.GetNewQuoteDtl(QDS,qNum); QuoteAsmDataSet ds =QuoteASM.GetByID(qNum,qLine,AssemblySeq); //QuoteAsmDataSet ds= new QuoteAsmDataSet(); int newInt=AssemblySeq+10; int iSeq=QuoteASM.getNextOpDtlSeq(sCompanyID,qNum,qLine,AssemblySeq,OprSeq); QuoteASM.GetNewQuoteOpr(ds,qNum,qLine,OprSeq); QuoteASM.GetNewQuoteMtl(ds,qNum,qLine,AssemblySeq); Table:QuoteOpr ..... ForeignKeyConStraint QuoteASmQuoteOpr requires the Child key Values (A,B,C,D) to exist in the Parent table. Any Idea should I be using an Adapter? Help --- ## Post #2 by @JeffSanders Shouldn’t this line have an assembly seq instead of an operation seq? QuoteASM.GetNewQuoteOpr(ds,qNum,qLine,OprSeq); JPS --- ## Post #3 by @griffith You're correct Jeff thanks. I got past that error will keep you posted. TY --- **Canonical:** https://www.epiusers.help/t/add-operation-material-to-a-quote-using-c/36690 **Original content:** https://www.epiusers.help/t/add-operation-material-to-a-quote-using-c/36690