public class VKItemCSIDNumbers extends common { public static boolean checkExist(VKCSIDNumber _csid, ItemId _itemId) { if (_itemId && _csid && !VKItemCSIDNumbers::exist(_csid, _itemId)) { return checkFailed(strFmt("Inventory CSID number %1 does not exists for item %2", _csid, _itemId)); } return true; } public static boolean exist(VKCSIDNumber _csid, ItemId _itemId) { return _itemId && _csid && (select VKItemCSIDNumbers where VKItemCSIDNumbers.ItemId == _itemId && VKItemCSIDNumbers.CSIDNumber == _csid ).RecId != 0; } }
final class VKInventTrackingDimensionCSID extends InventTrackingDimension { public boolean checkExistsValueForItem(InventTable _inventTable, anytype _value) { return VKItemCSIDNumbers::checkExist(_value, _inventTable.ItemId); } public boolean isItemCoverageDimension() { return true; } public boolean isTransferReceiptMergeable() { return true; } public boolean isTransferTransitReceiptMergeable() { return true; } /// <summary> /// Returns the singleton instance of the <c>InventTrackingDimensionCSID</c> class. /// </summary> /// <returns>An instance of the <c>InventTrackingDimensionOwner</c> class.</returns> public static VKInventTrackingDimensionCSID getInstance() { return InventDimension::singletonFromInventDimFieldId(fieldNum(InventDim, InventDimension3)) as VKInventTrackingDimensionCSID; } }3. Implement the binding mapping. This is accomplished by extending the method InventDimFieldBinding.className2FieldName().
/// <summary> /// Extension class for InventDimFieldBinding table /// </summary> [ExtensionOf(tablestr(InventDimFieldBinding))] final class VKInventDimFieldBindingTable_Extension { protected static FieldName className2FieldName(ClassName _className) { var fieldName = next className2FieldName(_className); if (_className == classStr(VKInventTrackingDimensionCSID)) { return fieldStr(InventDim, InventDimension3); } return fieldName; } }4. Enable the configuration key.
K:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd **axdbadmin_from_lcs** --setupmode maintenancemode --isinmaintenancemode trueOr from SQL Management Studio:
update SQLSYSTEMVARIABLES SET VALUE = 1 where PARM = 'CONFIGURATIONMODE'More about maintanance mode: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/sysadmin/maintenance-mode
K:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd **axdbadmin_from_lcs** --setupmode maintenancemode --isinmaintenancemode falseOr from SQL Management Studio:
update SQLSYSTEMVARIABLES SET VALUE = 0 where PARM = 'CONFIGURATIONMODE'
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.
Authors are allowed to set their own AdSense units.
Join us.