Quote Entry - method GetNewJobOper() - issue creating operation on subassembly


In 10.2.300 Quote Entry, trying to create a MOM from data in a UD table.

I can create operations on assembly 0 okay (ops 10 - 30), and can create a subassembly okay. The issue is creating an operation on the subassembly.

The subassembly, sequence 1, gets focus after it’s created and it’s updated with oTrans.Update(). So far so good.

At a messagebox just before I get a new operation record with GetNewJobOper(false), the subassembly still has focus and the assembly sequence in edvJobAsmbl.CurrentDataRow[“AssemblySeq”] is 1. Still okay.

But upon getting the new job operation instead of getting op 10 on subassembly 1, it’s placed on assembly 0 and focus goes to the new operation created on assembly 0 instead of 1.

I would expect the new operation to be created on the current focus subassembly.

Just before getting new operation:

Just after:

Any experience with this out there?



I believe the binding is CurrAsm not JobAmbl if that helps

Thanks, Tanner.

I substituted edvJobAsmbl with edvCurrAsm, and saw no changes in operation.

By the time I create the new operation, I have added operations on assembly 0 and have added assembly 1, and assembly 1 is displayed with focus on it. By my thinking, adding a new operation would be added to the current subassembly, but it’s not happening.

But, if I then physically click on assembly 1 in the jobtree and then add just the operations, they add in at the right place.

I wonder if there is a way to programmatically select the assembly I’ve just added. ??



What does your code look like currently? Maybe it’s just a matter of setting the parent assembly sequence to the correct value?


Here’s the code. The first thing I do after getting the new record is set the assembly sequence, but the record has already been added under assembly 0. Setting it to 1 generates an error.

I’m wondering what I might see passed in on a BPM. Will try than next.

Thanks for the ideas.


	private void getFSJobOper(string externalreferenceid, string assemblyseq)
		// BAQ for records from Fan Selector - UD03
		string baqName = "TCF_FSQuoteLineOpr";

		dtFSJobOper = null;

		DynamicQueryAdapter dqa = new DynamicQueryAdapter(oTrans);
		QueryExecutionDataSet qeds = dqa.GetQueryExecutionParametersByID(baqName);

		qeds.ExecutionParameter.AddExecutionParameterRow("paramExternalReferenceID", externalreferenceid, "nvarchar", false, Guid.NewGuid(),"A");
		qeds.ExecutionParameter.AddExecutionParameterRow("paramAssemblySeq", assemblyseq, "nvarchar", false, Guid.NewGuid(),"A");


		dtFSJobOper = dqa.QueryResults.Tables["Results"];


		if (dtFSJobOper.Rows.Count > 0)
			for (int i = 0; i < dtFSJobOper.Rows.Count; i++)

				bool result = oTrans.GetNewJobOper(false);

				// we set the assembly sequence here, but it's already been set to asm 0 on the getnewjoboper
				edvJobOper.CurrentDataRow["AssemblySeq"] = dtFSJobOper.Rows[i]["UD03_AssemblySeq_c"].ToString();
				edvJobOper.CurrentDataRow["OprSeq"] = dtFSJobOper.Rows[i]["UD03_OprSeq_c"].ToString();
				edvJobOper.CurrentDataRow["OpCode"] = dtFSJobOper.Rows[i]["UD03_OpCode_c"].ToString();
				edvJobOper.CurrentDataRow["EstSetHours"] = dtFSJobOper.Rows[i]["UD03_EstSetHours_c"].ToString();
				edvJobOper.CurrentDataRow["ProdStandard"] = dtFSJobOper.Rows[i]["UD03_ProdStandard_c"].ToString();
				edvJobOper.CurrentDataRow["StdFormat"] = dtFSJobOper.Rows[i]["UD03_StdFormat_c"].ToString();
				edvJobOper.CurrentDataRow["QtyPer"] = dtFSJobOper.Rows[i]["UD03_QtyPer_c"].ToString();
				edvJobOper.CurrentDataRow["EstScrap"] = dtFSJobOper.Rows[i]["UD03_EstScrap_c"].ToString();
				edvJobOper.CurrentDataRow["EstScrapType"] = dtFSJobOper.Rows[i]["UD03_EstScrapType_c"].ToString();
				edvJobOper.CurrentDataRow["IUM"] = dtFSJobOper.Rows[i]["UD03_IUM_c"].ToString();



Here is some code that might help. I think the key is calling GetNewJobOper with the subassembly number.

using (var svc = WCFServiceSupport.CreateImpl<Erp.Proxy.BO.JobEntryImpl>(session, Epicor.ServiceModel.Channels.ImplBase<Erp.Contracts.JobEntrySvcContract>.UriPath))
         Erp.BO.JobEntryDataSet myDs = new Erp.BO.JobEntryDataSet();
         //Get Job Assembly 1
         myDs = svc.GetDatasetForTree(myjob, 0, 1, false, "MFG");
         //Get New Job Operation for Assembly 1
         svc.GetNewJobOper(myDs, myjob, 1);
         svc.ChangeJobOperOpCode("SRVC", out mymsg, myDs);

Cool. I’ll give it a look. Have you run this code from Quote Entry?

I put a message display in a BPM on JobEntry.GetNewJobOper. It didn’t hit anything there when I created a new operation from the quote entry jobtree.



No, that example was from JobEntry so I’m not sure it will work. I also took a quick peek at the code for the QuoteEntry form and it appears the method on oTrans is hardcoded to use the value of the assembly sequence in the currentAssyView. Hope that helps!

Good deal. I’ve been looking at the jobtree for info, but it’s slow slogging. I’ll look at the current assembly view.

Thanks again.