I have added a UD date field on JobProd to display the OrderRel.PromiseDate for a given Order Demand link. I have a Pre-Processing Method Directive on Erp.BO.JobEntry.ChangeJobProdOrderRelNum that pulls in the Promise Date from the Order Release when a demand link is added. This works fine.
I also have a In-Transaction Data Directive that will update the JobProd UD date when an update and save is done. This is required in the event that the OrderRel.PromiseDate is changed we want to display the updated date on the Job demand.
Where I am running into an issues is…I would like to have the Job Prod date refresh on the demand without having to perform an update/save on JobProd. I would be good if when the user unchecks Engineered at the JobHead, if the JobProd date would refresh and pull the value again from OrderRel. Any ideas on the best way to do this?
I am missing something as I am not able to get the JobProd date to update using the Erp.BO.JobEntry.ChangeJobHeadJobEngineered. I have tried using Set Field and Update Table by Query.
i bet that the challenge here is that the dataset is not in an update status or does not include the JobProd record in to do this. You might need to write some c# code to do the udpate.
Have to ask, why are you even bothering to store the same data in JobProd when you can just display it from the related OrderRel. Would eliminate the UD col as well
What is involved in “just displaying” it? I have tried to follow several user group posts which involved creating a data view and event but I think I am confusing myself
Wouldn’t it be better to change Job Prod UD field when Order Rel promise date is changed?
Keep this as is:
And then create In-trans at OrderRel to check if promise date is changed, update at jobProd table. And as @timshuwy said, you will need custom code to update.
@itsme THANK YOU!! Your code work great in my initial testing. I am going to do some further testing today with jobs with multiple demand links to different orders but don’t expect any issues since the code is based on the Order Num, Line, Release.
Just a thought… make sure that you validate that the data in the TIME PHASE has been updated after you do this. You MIGHT need to change the date in the related PARTDTL table as well. otherwise timephase will not be in sync with the dates you changed.
@timshuwy Thanks for the tip. What I am doing should not impact Time Phase as both date fields (JobProd & OrderRel) are actually UD fields and not the standard OrderRel.PromiseDate field that was recently added. Long story but our manufacturing wanted to store what we call “Mfg Promise Date” that could be different from the Order Promise Dates. This needed to be stored on the Order Release since the JobProd Order demand record gets deleted when a demand link is deleted and relinked. By having this on Order Release it can be updated and we can pull it when a new demand link is added or one is re-linked.