/// <summary> /// The <c>ReleaseUpdateDB63_WHSMinorUpdateVKRetail</c> class contains upgrade scripts for the WHS area data /// </summary> class ReleaseUpdateDB63_WHSMinorUpdateVKRetail extends ReleaseUpdateDB { #define.version(sysReleasedVersion::v63) #define.className(ReleaseUpdateDB63_WHSMinorUpdateVKRetail) } public void initPostSyncUpdateJobs() { #initSyncJobsPrefix } /// <summary> /// Gets the module name of an upgrade class. /// </summary> /// <returns> /// The module name. /// </returns> /// <remarks> /// This method must be implemented by sub classes.The module name is displayed on the cockpit form for /// every script. /// </remarks> public ReleaseUpdateModule moduleName() { return classId2Name(classIdGet(this)); } /// <summary> /// Updates WHSRFMenuItemTable with new WHSWorkActivity base enum values /// </summary> [ UpgradeScriptDescriptionAttribute('Updates VK Retail base enums values'), UpgradeScriptConfigKeyAttribute(configurationKeyStr(WHSAndTMS)), UpgradeScriptStageAttribute(ReleaseUpdateScriptStage::PostSyncUpdate), UpgradeScriptTypeAttribute(ReleaseUpdateScriptType::StandardScript), // Tables which data is updated // str _tableName, boolean _create, boolean _read, boolean _update, boolean _delete, boolean _exclude = false UpgradeScriptTableAttribute(tableStr(WHSRFMenuItemTable), false, true, true, false), UpgradeScriptTableAttribute(tableStr(RetailChannelProfile), false, true, true, false), UpgradeScriptTableAttribute(tableStr(WHSWorkUserSession), false, true, true, false) ] public void updateEnumValues() { RetailChannelProfile retailChannelProfile; WHSRFMenuItemTable wHSRFMenuItemTable; WHSWorkUserSession wHSWorkUserSession; ttsBegin; // data update goes here update_recordSet retailChannelProfile setting ChannelProfileType = RetailChannelProfileType::VKCallCenter where RetailChannelProfile.ChannelProfileType == 7; ttsCommit; }Additional method to existing class:
/// <summary> /// Updates WHSRFMenuItemTable with new WHSWorkActivity base enum values /// </summary> [ UpgradeScriptDescriptionAttribute('Updates VK Retail base enums values'), UpgradeScriptConfigKeyAttribute(configurationKeyStr(WHSAndTMS)), UpgradeScriptStageAttribute(ReleaseUpdateScriptStage::PostSync), UpgradeScriptTypeAttribute(ReleaseUpdateScriptType::StandardScript), // Tables which data is updated // str _tableName, boolean _create, boolean _read, boolean _update, boolean _delete, boolean _exclude = false UpgradeScriptTableAttribute(tableStr(WHSRFMenuItemTable), false, true, true, false), UpgradeScriptTableAttribute(tableStr(RetailChannelProfile), false, true, true, false), UpgradeScriptTableAttribute(tableStr(WHSWorkUserSession), false, true, true, false) ] public void updateVKWHSWorkEnum() { ClassName className = classStr(ReleaseUpdateDB63_WHSMinorUpdateVKRetail); MethodName methodName = methodStr(ReleaseUpdateDB63_WHSMinorUpdateVKRetail, updateEnumValues); ReleaseUpdateDB::MarkAMinorVersionScriptAsFinished(className, methodName); }Data upgrade script should appear in:
If you found value in what I share, I've set up a Buy Me a Coffee page as a way to show your support.
Buy Me a CoffeeNo comments. Be the first one to comment on this post.
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 "buy me a coffee" link.
Join us.