Help with Customization

Sorry for the vague topic, but did not want to be specific in case what I have been trying to do is wrong.

We are going to be quoting in another system. I am planning on having the won quotes be integrated into an Epicor Quote. Then we are going to create the Order from the Quote. Finally, I want to use the Order Job Wizard to create the Job. That all works except it creates the Job as Engineered and I do not want that.

I have been trying to do a Post Processing BPM on the OrderJobWizard.CreateJobs where I get the newly created JobNum in a CallContext field and then use that to JobEntry.GetByID, change JobEngineered to false, and save.

I have tried 2 methods, JobEntry.ChangeJobHeadJobEngineered and JobEntry.Update. The first one returns with “JobHead has not changed” and the Update just does not work.

Any help would be appreciated. Not even sure I am trying to do it in the best way.

Have you tried using UpdateExt instead of Update?

1 Like

I have some custom code that un-engineers a job. In order to get the job unengineered, I had to set JobEngineered = false, RowMod = “U”, and then call ChangeJobHeadJobEngineered() and Update:

private void UnEngineerJob(JobEntryAdapter job)
	{		
		try
		{
			job.JobEntryData.JobHead[0].JobEngineered = false;
			job.JobEntryData.JobHead[0].RowMod = "U";
			
			job.ChangeJobHeadJobEngineered();
			job.Update();
			
		} catch (System.Exception ex)
		{
			//ExceptionBox.Show(ex);
		}
	}

Thanks, I’ll give those a try.

Finally got it working. I had forgotten something that I had learned before. Always show the field you want to edit in DD message boxes when trying to do something in a process.

I put a message box on an IP DD that showed JobEngineered and RowMod. Because I was creating a job through a process instead of through the form, my message box fired 4 times. First it was an A and the next 3 were an U. On the final U, the field changed from False to True. So I just created an IP DD that checked for certain text I put in a BPM Context field on a PreP MD on the JobWizard and also checked for JobEngineered to change from False to True and I set it right back to False. :grinning:

2 Likes

Hey JOhn:

Any chance of you sharing your code? I am trying ( in a data-directive, Std) to 'un-engineer' a job, and I am having the same issues (JObHead has not changed , etc.).

Yeah. I am going to try and remember to email it to you tonight. :grinning:

Thank you