As user of and/or partner reselling our Visual Service Scheduler Gantt add-in for service planning with Dynamics NAV you probably are already familiar with its visual alerts indicating situations that might jeopardize the execution of your order according to schedule.
For some NAV users these visual alerts were not enough, however, so that several of our partners asked us for a way to implement visual signals for highlighting a resource's unavailability such as specific "downtimes", absences, and external blockades. Their wish was our command so that today I can show you how to highlight absences by individual colors and tooltips and, as a side-effect, gain better resource utilization with NAV.
Quick update: Default visual alerts of the VSS
Before going into detail, I'd like to briefly mention again the visual alerts coming with the VSS by default:
- The capacity curve turns red in case of an impending overload.
- Exceeding of the response date is indicated by according milestone symbols, their appearance depending on the group's status:
Expanded group: The allocation is later than the response date.
Collapsed group: The allocation is later than the response date.
Different kinds of unavailabilities
It goes without saying that resource planning is one of the most crucial issues in service scheduling, since the resources lie at the heart of your schedule - without them no service could be delivered!
As reliable your staff members or machines may be, there will of course always be cases in which it comes to absences. These may arise from various causes such as illness, business trips, training, or - as far as machines are concerned - maintencance and repair. Furthermore, resources could be blocked by other modules (i.e. Assembly and Jobs).
So why not define different colors and/or tooltips for the different kinds of unavailabilities so that you can always quickly grasp not only that a resource is unavailable but also why. Only little programming effort is needed for this.
Step #1: Specify the kinds of unavailabilities
Currently, this is done by global text constants in the codeunit 5416200 (NETRONIC VSS Management).
There you can specify a color and a relating tooltip text, grouped as couple. Note that the color is set as HTML Color, e.g., #FFFFFF for white, #000000 for black, #FF0000 for red etc.
In our case, we want to display holidays in green.
The options in detail
- TEXT7301 und TEXT7302 determine color and tooltip text for cases where a daily capacity greater than 24 h was calculated (possibly by mistake).
- TEXT7303 and TEXT7304 determine color and tooltip text for cases where a daily capacity less than 0 h was calculated (possibly by mistake).
- TEXT7305 and TEXT7306 determine color and tooltip text for resource blockades caused by the Job Module. Note to tick the corresponding checkbox in the Setup dialog.
- TEXT7307 and TEXT7308 determine color and tooltip text for resource blockades caused by the Assembly Module. Note to tick the corresponding checkbox in the Setup dialog.
- TEXT7310 determines the default color for usual non-working times.
- TEXT7311 and TEXT7312 determine color and tooltip text for downtimes that are not further specified.
- TEXT7313 to TEXT7330 let you determine specified downtimes.
- Absences or downtimes are always caused by a negative record in the Res. Capacity Entry table.
- These records are read by the LoadResourceData method of the above mentioned code unit.
Step #2 - Add comment field to Resource Capacity Table
Now you have to add a comment field to the table Resource Capacity in NAV where you enter the kind of unavailabilties corresponding to the global text constants you have defined earlier in the codeunit 541620. This makes sure that the comment assigned to the record will be checked for appearing in the TextConstants TEXT7313, TEXT7315, TEXT7317, TEXT7319, TEXT7321, TEXT7323, TEXT7325, TEXT7327 or TEXT7329 and the corresponding color will be applied.
If the relating DOT.NET object doesn’t get a comment while being read, color and tooltip text as described under #6 of the above list will be applied.
Step #3 - Modify the CA/L code
Now adjust the CA/L code to your new constants as shown below. If we want to display absences of resource Linda that are due to holidays by the text "Holiday" and the color green, the code has to look as follows:
IF ResourceCapacityRec.FINDSET THEN
ResourceCapacity.EntryNo:= ResourceCapacityRec."Entry No.";
ResourceCapacity.ResourceGroupNo:= ResourceCapacityRec."Resource Group No.";
ResourceCapacity.ResourceNo:= ResourceCapacityRec."Resource No.";
// If tooltip and coloring of resource outages is desired, activate the following two lines
IF ((ResourceCapacityRec.Capacity < 0) AND (ResourceCapacity.ResourceNo = 'Linda')) THEN
ResourceCapacity.Comment := TEXT7313; //= AbsenceType1 (or another type)
UNTIL ResourceCapacityRec.NEXT = 0;
maxEntryNo := ResourceCapacityRec."Entry No.";
As a result of the above described code modifications, Linda's holidays are displayed like shown in the picture below. This way, unavailabilities of resources can easily be recognized and interpreted.
More information and further reading
- Watch a recorded webinar on the VSS.
- Read about the 3 Most Loved Features of the Visual Service Scheduler for Microsoft Dynamics NAV
- Get our free ebook about Visual Scheduling for Microsoft Dynamics NAV: