[X++] Labels and TFS
When using Dynamics AX 2012 with the Team Foundation Server as version control, the TFS handles your labels different than the standard AX.
When creating a new label in AX, it will get a temporary ID. When checking in the label, it gets its real ID and the TFS will take care to replace all occurings of the temporary ID with the real value and we are good to go. ... Are we?
There are 3 scenarios and one of them needs attention.
Setup of test scenario
Let's assume we created a label and a form that is using this label somewhere in the controls.
Scenario 1: Check-In of both elements
When we check in the labelfile and the form at the same time, the magic is happening and your form will automatically get the correct permanent label ID.
Everything works fine.
Scenarion 2: Check-In of form, but not labelfile
When checking in the form only and not the labelfile, the system does not know the permanent ID of the label used and so the forms contains the temporary label ID.
To solve this, you need to check-in the labelfile, find the permanent label ID and manually modify the form.
Fortunately the TFS helps here with updating the temporary label with a hint:
Scenario 3: Check-In of labelfile, but not the form
When you check-in the labelfile first and not the form, the system knows the permanent label ID. When you later check-in the form, the system replaces the temporary label ID with the correct permanent.
To be safe, either check-in the labelfile first or all elements using new labels at the same time.
Hope this helps as reference.