web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Changing the sequence of started production Jobs from code

(0) ShareShare
ReportReport
Posted on by 48

Hi all,

I am currently creating a form which should make it possible to insert operations (ProdRoutes / Jobs) into running productions. Logic is a little bit complex, but basically a new record is inserted in ProdRoute table behind the last finished one, OprNum & OprNumNext of all following ProdRoute records (for BOM aswell) are adapted (incremented) and production is rescheduled and reestimated. This is working fine for Productions where started Jobs are also 'completed' (JobStatus).

But now it's getting a little bit tricky. In case a job has the status 'stopped' the new job should be inserted 'in front of it', while acquisitions and status of 'stopped' job should be kept.

Case example: A workman starts a job, but notices that the product is not in the condition intended for this job. He stops the job. A foreman then inserts a new job into the system, that has to be completed beforehand. When the new job is reported complete, the workman can start his job again.

Current functionality/Incrementing OprNum has no effect here, since JobId is the primary index of JmgJobTable and the stopped Job doesn't get an new JobId on reschedule. As a result, the new created Job is inserted behind the stopped one, even though it has a lower OprNum. As far as I can tell, the only way to get the desired functionality would be to reschedule the job aswell and change the RefId of all related records to the new JobId.

Since I'm still new in AX, I wanted to ask if anyone has implemented something similar and if so, how, or if anyone knows a better solution, as this approach does not seem particularly effective to me.

Best regards

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans