I want to create a Method Directive that sets a UD field with the time that the job was created. I’m guessing that it would be set at Erp.BO.PlanningWB.CreateJobFromPWB post-processing.
What I tried to do was start with
foreach (var row in ttJobHead.Where(r => r.Added()))
But it doesn’t like ttJobHead I’m getting an error.
Are you wanting this only on jobs from the planning work bench or on all jobs? PlanningWBTableset doesn’t have the dataset for Jobhead as it is probably calling jobentry.getanewjob and using that to create the job. Trace should show you this.
Personally, I would just add an in transaction data directive on jobhead and use a simple Set Field widget to set the field. It should work easier with less issues and be a quicker way to do it.