Monday, 13 July 2015

AX 2012 TFS issue - Unable to check in. (Label file)

I was facing an issue while check-in label file.

Cause of issue
- MS Product bug.
- TFS Multiple check out option is set to false(This issue won't arise when this option is true).

Reason
When multiple check out option is set to false. TFS will lock (first instance of lock) the object so that any other developer will not be able to check-out the same. And while checkin the object AX code(Only for label files) will lock the object (second instance of lock) and do the checkin. But two locks cannot be performed on same object so system will throw issue. 


Resolution

I have debug the code and found that while check-in the label object, SysLabelFile.allowLockDuringCheckIn() method returns true but it must be implemented in the way  SysTreeNode.allowLockDuringCheckIn() class is implemented. We need to change allowLockDuringCheckIn method in SysLabelFile class to return “false” instead of “true”. Please find screen shot below









1 comment: