Coding tips (for partners)

Use milestones

For visualizing milestones in the VJS, their usage has to be activated by modifying the data interface.

Since NAV doesn't offer milestones neither on Job level nor on Job task level, many partners created for their customers suitable data fields in the according tables (167 for Jobs, 1001 for Job Tasks). For visualizing these milestones also in the VJS, their usage has to be activated by modifying the data interface.

Milestones on Job level

Milestones on Job level are used for indicating a planned delivery date (or similar) for your jobs by a grey diamond shaped symbol turning red in case the date gets exceeded. The date of the milestone symbol can’t be modified by drag & drop.

Activate the milestones

Open codeunit 5416100 NETRONIC VJS Management where we have already prepared for you some lines of code. Supposing that you have already created the needed fields, you only have to uncomment the according code lines. For quickly finding the according section, search for the strings '++'.

vsj_coding_tips_milestones_ code1

Result

After having uncommented the code lines, a grey milestone symbol will be shown on Job level which turns red if the end date of a job planning line is later than the milestone date.

vsj_coding_tips_milestones_ 1-1

Milestones on Job Task level

The Job Task level milestones in the VJS are currently only representing the start and end of a Job Task to mark whether the Job Task is currently violating either the start or end milestone. You need not always define a pair of milestones but you could also specify only the start milestone for some Job Tasks, and both or only the end milestone for others.

Acitvate the milestones

The milestones on Job Task level are also put into action in codeunit 5416100 NETRONIC VJS Management where we have already prepared for you some lines of code. Supposing that you have already created the needed fields, you only have to uncomment the according code lines. For quickly finding the according section, search for the strings '&&'.

vsj_coding_tips_milestones_ code2

Result

After having uncommented the desired code lines, the following cases will be illustrated by milestones:

  • · No discrepancies (grey)
  • The actual start date is later than the milestone Start (red)
  • The actual end date is later than the milestone End (red)
vsj_coding_tips_milestones_ 2