Codeunit 5505377 M365 App Setup Management
Codeunit M365 App Setup Management (ID 5505377). Management codeunit to handle app setup.
procedure CheckUpgradeMinimumVersion(appInfo: ModuleInfo; minVersion: Version; raiseError: Boolean): Boolean
Checks against a passed minimum version of the app usually used in an upgrade codeunit. In case the actual data version is less than the passed minimum version, the procedure returns false, true otherwise. If raiseError is true, an error is shown instead.
appInfo ModuleInfo
The ModuleInfo of the extension from where this procedure is called.
minVersion Version
The requested minimum version to test against.
raiseError Boolean
Raise an error instead of returning a boolean.
Returns Boolean
True if the requested minimum version is met, false or error otherwise.
procedure RegisterAppPrefix(appInfo: ModuleInfo; appPrefix: Code[15]): Boolean
Used to register an application prefix (like FND for the Foundation) to the setup management. The value is stored within the Isolated Storage and can be read afterwards.
The so called App Prefix is used as the Configuration Data Code in the generic assisted setup.
appInfo ModuleInfo
The ModuleInfo of the extension from where this procedure is called.
appPrefix Code[15]
The internally registered prefix of type Code[15].
Returns Boolean
True if the value could be stored, false otherwise.
procedure GetAppPrefix(appInfo: ModuleInfo; appPrefix: Code[15]): Code[15]
Returns the stored App Prefix for the passed appInfo. If the appPrefix is filled, then this value is returned.
appInfo ModuleInfo
The ModuleInfo of the extension from where this procedure is called.
appPrefix Code[15]
The internally registered prefix of type Code[15].
Returns Code[15]
The stored app prefix for the specified app or the passed default appPrefix.
procedure GetAppPrefix(appInfo: ModuleInfo): Code[15]
Returns the stored App Prefix for the passed appInfo.
appInfo ModuleInfo
The ModuleInfo of the extension from where this procedure is called.
Returns Code[15]
The stored app prefix for the specified app or an empty string.
procedure GetAppPrefix(appId: Guid; appPrefix: Code[15]): Code[15]
Returns the stored App Prefix for the passed app Guid. If the appPrefix is filled, then this value is returned.
appId Guid
The app Guid of the extension from where this procedure is called.
appPrefix Code[15]
The internally registered prefix of type Code[15].
Returns Code[15]
The stored app prefix for the specified app or the passed default appPrefix.
procedure GetAppPrefix(appId: Guid): Code[15]
Returns the stored App Prefix for the passed app Guid.
appId Guid
The app Guid of the extension from where this procedure is called.
Returns Code[15]
The stored app prefix for the specified app or an empty string.
procedure CompleteAssistedSetup(appId: Guid; packageCode: Code[20])
Sets the status of the assisted setup to Complete.
This is typically called from inside the assisted setup guide when the setup is finished.
appId Guid
The app Guid of the extension from where this procedure is called.
packageCode Code[20]
The code of the related Configuration Package, usually combined of the Data Configuration Code, a dash, and the Languiage ID.
procedure CompleteAssistedSetup(configurationCode: Code[15]; appId: Guid)
Sets the status of the assisted setup to Complete.
This is typically called from inside the assisted setup guide when the setup is finished.
configurationCode Code[15]
The code of the related Configuration Data/the internal App prefix.
appId Guid
The app Guid of the extension from where this procedure is called.
procedure IsAssistedSetupComplete(appId: Guid): Boolean
Checks whether a user has already completed the setup.
appId Guid
The app Guid of the extension from where this procedure is called.
Returns Boolean
Returns true if the given setup guide has been completed by the user, otherwise false.
procedure BuildPackageCode(configurationDataCode: Code[15]; languageId: Integer; mustExist: Boolean): Code[20]
Creates a (RapidStart) Package Code from a Configuration Data Code/App Prefix and a Language ID. If mustExist is true, the function raises an error if the Configuration Package is not found.
configurationDataCode Code[15]
Configuration Data Code/App Prefix.
languageId Integer
Language ID.
mustExist Boolean
If true, raises an error if the Configuration Package is not found.
Returns Code[20]
Returns the built Configuration Package Code.
procedure HasConfigurationPackage(packageCode: Code[20]): Boolean
Checks whether a Configuration Package with the passed code exists.
packageCode Code[20]
A Configuration Package Code.
Returns Boolean
Returns true if the package is found, false otherwise.
procedure ImportConfigurationPackage(packageCode: Code[20]; force: Boolean; var packageTempBlob: Codeunit "Temp Blob"): Boolean
Import the specified Configuration Package from a “Temp Blob”.
packageCode Code[20]
A Configuration Package Code.
force Boolean
True allows to overwrite an existing package.
packageTempBlob Codeunit "Temp Blob"
The package content as “Temp Blob”.
Returns Boolean
Returns true if the package exists and force is not specified or if the package was successfully imported, false otherwise.
procedure CleanupConfigurationData(appInfo: ModuleInfo): Boolean
Deletes existing Configuration Data records from the database.
appInfo ModuleInfo
The ModuleInfo of the extension to which the data belongs.
Returns Boolean
Returns true if data has been deleted, false otherwise.
procedure ImportConfigurationDataAsConfigurationPackage(appInfo: ModuleInfo; configurationDataCode: Code[15]; languageId: Integer; force: Boolean): Boolean
Imports Configuration Data for the specified app, Configuration Data Code/App Prefix, and language ID.
appInfo ModuleInfo
The ModuleInfo of the extension to which the data belongs.
configurationDataCode Code[15]
A Configuration Data Code/App Prefix.
languageId Integer
The language ID.
force Boolean
If true, an existing Configuration Package gets overwritten.
Returns Boolean
Returns true of the import was successful, false otherwise.
procedure ImportConfigurationDataAsConfigurationPackage(appId: Guid; configurationDataCode: Code[15]; languageId: Integer; force: Boolean): Boolean
Imports Configuration Data for the specified app, Configuration Data Code/App Prefix, and language ID.
appId Guid
The application ID of the extension to which the data belongs.
configurationDataCode Code[15]
A Configuration Data Code/App Prefix.
languageId Integer
The language ID.
force Boolean
If true, an existing Configuration Package gets overwritten.
Returns Boolean
Returns true of the import was successful, false otherwise.
procedure ImportConfigurationDataAsConfigurationPackage(appInfo: ModuleInfo; configurationDataCode: Code[15]; force: Boolean): Boolean
Imports Configuration Data for the specified app, Configuration Data Code/App Prefix, and the current users language ID.
appInfo ModuleInfo
The ModuleInfo of the extension to which the data belongs.
configurationDataCode Code[15]
A Configuration Data Code/App Prefix.
force Boolean
If true, an existing Configuration Package gets overwritten.
Returns Boolean
Returns true of the import was successful, false otherwise.
procedure ImportConfigurationDataAsConfigurationPackage(appId: Guid; configurationDataCode: Code[15]; force: Boolean): Boolean
Imports Configuration Data for the specified app, Configuration Data Code/App Prefix, and the current users language ID.
appId Guid
The application ID of the extension to which the data belongs.
configurationDataCode Code[15]
A Configuration Data Code/App Prefix.
force Boolean
If true, an existing Configuration Package gets overwritten.
Returns Boolean
Returns true of the import was successful, false otherwise.
procedure ImportLocalConfigurationPackage(var returnPackageTempBlob: Codeunit "Temp Blob"): Boolean
Import an uncompressed Configuration Package file into the passed “Temp Blob”.
returnPackageTempBlob Codeunit "Temp Blob"
The returned “Temp Blob” containing the package.
Returns Boolean
Returns true of the import was successful, false otherwise.
procedure ImportLocalConfigurationPackage(packageCode: Code[20]): Boolean
Import a Configuration Package file into Configuration Packages using the specified Package Code.
packageCode Code[20]
The Package Code to use.
Returns Boolean
Returns true of the import was successful, false otherwise.
procedure FilterConfigPackageTable(packageCode: Code[20]; tableId: Integer; var configPackageTable: Record "Config. Package Table"): Boolean
Filters an instance of Config. Package Table using the passed arguments.
packageCode Code[20]
The Configuration Package Code.
tableId Integer
The Table ID.
configPackageTable Record "Config. Package Table"
Returned, filtered Config. Package Table record.
Returns Boolean
Returns true if a record is available, false otherwise.
procedure ApplyConfigurationPackage(packageCode: Code[20]; tableId: Integer): Boolean
Applies the contained data of a Configuration Package to the specified table.
packageCode Code[20]
Configuration Package Code.
tableId Integer
Table ID.
Returns Boolean
Returns true if no errors occured, false otherwise.
procedure ApplyConfigurationPackage(packageCode: Code[20]): Boolean
Applies the contained data of a Configuration Package to the configured tables.
packageCode Code[20]
Configuration Package Code.
Returns Boolean
Returns true if no errors occured, false otherwise.
procedure ApplyWizardStepConfiguration(packageCode: Code[20]): Boolean
Applies the contained data of a Configuration Package to the M365 App Setup Wizard Step table.
packageCode Code[20]
Configuration Package Code.
Returns Boolean
Returns true if no errors occured, false otherwise.
procedure HasConfigurationPackageTable(packageCode: Code[20]; tableId: Integer): Boolean
Checks whether a Configuration Package with the specified table exists.
packageCode Code[20]
Configuration Package Code.
tableId Integer
Table ID.
Returns Boolean
Returns true if the specified table exists in the Configuration Package, false otherwise.
procedure ShowConfigurationPackageTableData(packageCode: Code[20]; tableId: Integer): Boolean
Opens the Configuration Package data viewer page for the specified package and table.
packageCode Code[20]
Configuration Package Code.
tableId Integer
Table ID.
Returns Boolean
Returns true if the records were available and were shown, false otherwise.
procedure RemoveConfigurationPackage(packageCode: Code[20])
Remove the specified Configuration Package from the database.
packageCode Code[20]
Configuration Package Code.
procedure RunWizard(appInfo: ModuleInfo; configurationDataCode: Code[15]; originalPageId: Variant)
This is a relic from the ancient times when there were dragons and magicians. When this function is executed, a portal to the data contained in the Extension is opened as if by magic and a fully automatic setup is started.
appInfo ModuleInfo
The ModuleInfo of the extension to which the data belongs.
configurationDataCode Code[15]
A Configuration Data Code/App Prefix.
originalPageId Variant
The Page ID of the original dummy Wizard page each app has to provide for this to work.
procedure BuildUpgradeTag(appInfo: ModuleInfo; workItemId: Integer): Code[250]
Returns a string with a fixed pattern for UpgradeTags including App Prefix and Work Item Id in Capitals.
The returned string is App specific. So no issues when using the same Work Item Id accross apps.
appInfo ModuleInfo
ModuleInfo. The module info for the app to build the tag for.
workItemId Integer
Integer. The Azure DevOps Work Item Id. Use a negative number to specify a non existing Work Item.
Returns Code[250]
Return a text in format FND-WI-1234 or FND-INT-9876 for negative Work Item Ids.
procedure BuildUpgradeTag(appId: Guid; workItemId: Integer): Code[250]
Returns a string with a fixed pattern for UpgradeTags including App Prefix and Work Item Id in Capitals.
The returned string is App specific. So no issues when using the same Work Item Id accross apps.
appId Guid
Guid. The AppId for the app to build the tag for.
workItemId Integer
Integer. The Azure DevOps Work Item Id. Use a negative number to specify a non existing Work Item.
Returns Code[250]
Return a text in format FND-WI-1234 or FND-INT-9876 for negative Work Item Ids.
procedure HasUpgradeTag(appInfo: ModuleInfo; workItemId: Integer): Boolean
Verifies if the upgrade tag exists.
appInfo ModuleInfo
ModuleInfo. The module info for the app to check the tag for.
workItemId Integer
Integer. The Azure DevOps Work Item Id to check for. Use a negative number to specify a non existing Work Item.
Returns Boolean
True if the Tag for the given Work Item Id exist, false otherwise.
procedure HasUpgradeTag(appId: Guid; workItemId: Integer): Boolean
Verifies if the upgrade tag exists.
appId Guid
Guid. The AppId for the app to check the tag for.
workItemId Integer
Integer. The Azure DevOps Work Item Id to check for. Use a negative number to specify a non existing Work Item.
Returns Boolean
True if the Tag for the given Work Item Id exist, false otherwise.
procedure HasUpgradeTag(appInfo: ModuleInfo; companyName: Text[30]; workItemId: Integer): Boolean
Verifies if the upgrade tag exists.
appInfo ModuleInfo
ModuleInfo. The module info for the app to check the tag for.
companyName Text[30]
Text[30]. The company name to check the tag for.
workItemId Integer
Integer. The Azure DevOps Work Item Id to check for. Use a negative number to specify a non existing Work Item.
Returns Boolean
True if the Tag for the given Work Item Id exist, false otherwise.
procedure HasUpgradeTag(appId: Guid; companyName: Text[30]; workItemId: Integer): Boolean
Verifies if the upgrade tag exists.
appId Guid
Guid. The AppId for the app to check the tag for.
companyName Text[30]
Text[30]. The company name to check the tag for.
workItemId Integer
Integer. The Azure DevOps Work Item Id to check for. Use a negative number to specify a non existing Work Item.
Returns Boolean
True if the Tag for the given Work Item Id exist, false otherwise.
procedure SetUpgradeTag(appInfo: ModuleInfo; workItemId: Integer)
Sets a new upgrade tag based on a Work Item Id.
appInfo ModuleInfo
ModuleInfo. The module info for the app to add the tag for.
workItemId Integer
Integer. The Azure DevOps Work Item Id to add the tag for. Use a negative number to specify a non existing Work Item.
procedure SetUpgradeTag(appId: Guid; workItemId: Integer)
Sets a new upgrade tag based on a Work Item Id.
appId Guid
Guid. The AppId for the app to add the tag for.
workItemId Integer
Integer. The Azure DevOps Work Item Id to add the tag for. Use a negative number to specify a non existing Work Item.
procedure SetDatabaseUpgradeTag(appInfo: ModuleInfo; workItemId: Integer)
Sets a new upgrade tag based on a Work Item Id.
appInfo ModuleInfo
ModuleInfo. The module info for the app to add the tag for.
workItemId Integer
Integer. The Azure DevOps Work Item Id to add the tag for. Use a negative number to specify a non existing Work Item.
procedure SetDatabaseUpgradeTag(appId: Guid; workItemId: Integer)
Sets a new upgrade tag based on a Work Item Id.
appId Guid
Guid. The AppId for the app to add the tag for.
workItemId Integer
Integer. The Azure DevOps Work Item Id to add the tag for. Use a negative number to specify a non existing Work Item.
procedure AddUpgradeTag(appInfo: ModuleInfo; var upgradeTags: List of [Code[250]]; workItemId: Integer)
Adds a Work Item Id Upgrade Tag to the passed list.
appInfo ModuleInfo
ModuleInfo. The module info for the app to add the tag for.
upgradeTags List[Code]
List of [Code[250]]. The List of Upgrade Tags to extend.
workItemId Integer
Integer. The Azure DevOps Work Item Id to add the tag for. Use a negative number to specify a non existing Work Item.
procedure BasePerDatabaseInstallation(appInfo: ModuleInfo; appPrefix: Code[15]; freshInstall: Boolean)
Performs a base installation of an app, including app prefix and setting all upgrade tags. Should be called from InstallAppPerDatabase().
appInfo ModuleInfo
ModuleInfo. The module info for the installed app.
appPrefix Code[15]
The internally registered prefix of type Code[15].
freshInstall Boolean
True indicates a fresh installation, app was never installed before.
procedure BasePerCompanyInstallation(appInfo: ModuleInfo; appPrefix: Code[15]; freshInstall: Boolean)
Performs a base installation of an app per company, includes setting all upgrade tags. Should be called from InstallAppPerCompany().
appInfo ModuleInfo
ModuleInfo. The module info for the installed app.
appPrefix Code[15]
The internally registered prefix of type Code[15].
freshInstall Boolean
True indicates a fresh installation, app was never installed before.
local procedure OnInitializeNotifications(var myNotifications: Record "My Notifications")
This event is raised when the Page “My Notifications” is opened.
myNotifications Record "My Notifications"
A modifyable Record “My Notifications”.
local procedure OnAfterInitializingNotification()
This event is raised after the “My Notifications” are initialized.
local procedure OnRegisterManualGuidedExperienceSetup(var guidedExperience: Codeunit "Guided Experience")
This event is raised whenever the manual setup entries are registered. Use the passed “Guided Experience” Codeunit to add entries.
guidedExperience Codeunit "Guided Experience"
Codeunit “Guided Experience”.
local procedure OnRegisterAssistedGuidedExperienceSetup(var guidedExperience: Codeunit "Guided Experience")
This event is raised whenever the assisted setup entries are registered. Use the passed “Guided Experience” Codeunit to add entries.
guidedExperience Codeunit "Guided Experience"
Codeunit “Guided Experience”.
local procedure OnReRunOfCompletedGuidedExperienceAssistedSetup(appInfo: ModuleInfo; var guidedExperience: Codeunit "Guided Experience"; var isHandled: Boolean)
Notifies the user that a setup that was previously completed is being run again.
appInfo ModuleInfo
The ModuleInfo of the extension to which the setup belongs.
guidedExperience Codeunit "Guided Experience"
A reference to the Codeunit “Guided Experience”.
isHandled Boolean
The flag which if set, would stop executing the run of the assisted setup guide.
local procedure OnBeforeRunAssistedSetup(appInfo: ModuleInfo; var isHandled: Boolean; var objType: ObjectType; var objectId: Integer)
Notifies that the Assisted Setup/Role Based Setup Experience has been invoked.
appInfo ModuleInfo
The ModuleInfo of the extension to which the setup belongs.
isHandled Boolean
The flag which if set, would stop executing the OnBeforeRunAssistedSetup of the assisted setup guide.
objType ObjectType
The object type to run when the user clicks the setup.
objectId Integer
The ID of the page to open when the user clicks the setup.
local procedure OnAfterRunAssistedSetup(appInfo: ModuleInfo; objType: ObjectType; objectId: Integer)
Notifies that the run of the assisted setup has finished.
appInfo ModuleInfo
The ModuleInfo of the extension to which the setup belongs.
objType ObjectType
The object type to run when the user clicks the setup.
objectId Integer
The ID of the page to open when the user clicks the setup.
procedure OnWizardBeforeLoadPackageData(var appSetupWizardStep: Record "M365 App Setup Wizard Step")
The OnWizardBeforeLoadPackageData event is called before the package data to display is loaded.
appSetupWizardStep Record "M365 App Setup Wizard Step"
var Record “M365 App Setup Wizard Step”.
procedure OnWizardAfterLoadPackageData(var appSetupWizardStep: Record "M365 App Setup Wizard Step"; var matrixColumnCaptions: array[100] of Text[100])
The OnWizardAfterLoadPackageData event is called, after the package data to display is loaded.
appSetupWizardStep Record "M365 App Setup Wizard Step"
var Record “M365 App Setup Wizard Step”.
matrixColumnCaptions Text[100]
var array[100] of Text[100].
procedure OnWizardBeforeTransferPackageDataToSetupFields(var appSetupWizardStep: Record "M365 App Setup Wizard Step")
The OnWizardBeforeTransferPackageDataToSetupFields event is called, before package data is transferred to setup fields.
appSetupWizardStep Record "M365 App Setup Wizard Step"
var Record “M365 App Setup Wizard Step”.
procedure OnWizardAfterTransferPackageDataToSetupFields(var appSetupWizardStep: Record "M365 App Setup Wizard Step"; var setupFields: JsonArray; var fieldValues: array[10] of Text)
The OnWizardAfterTransferPackageDataToSetupFields event is called, after package data is transferred to setup fields.
appSetupWizardStep Record "M365 App Setup Wizard Step"
var Record “M365 App Setup Wizard Step”.
setupFields JsonArray
var JsonArray.
fieldValues Text
var array[10] of Text.
procedure OnAfterTransferSetupFieldsToPackageData(packageCode: Code[20]; tableId: Integer; firstRecordOnly: Boolean; var setupFields: JsonArray; var fieldValues: array[10] of Text)
The OnAfterTransferSetupFieldsToPackageData event is called, after the setup fields are transferred to package data.
packageCode Code[20]
Code[20].
tableId Integer
Integer.
firstRecordOnly Boolean
Boolean.
setupFields JsonArray
var JsonArray.
fieldValues Text
var array[10] of Text.
procedure OnAfterChangeStep(appId: Guid; step: Integer; var appSetupWizardStep: Record "M365 App Setup Wizard Step"; var wizardText: JsonObject)
The OnAfterChangeStep event is called whenever the current wizard step changes.
appId Guid
Guid.
step Integer
Integer.
appSetupWizardStep Record "M365 App Setup Wizard Step"
var Record “M365 App Setup Wizard Step”.
wizardText JsonObject
var JsonObject.
procedure OnGetPerDatabaseUpgradeTags(var upgradeTags: List of [Code[250]])
Use this event if you want to add upgrade tags for PerDatabase upgrade method.
upgradeTags List[Code]
List of [Code[250]]. List of upgrade tags that should be inserted if they do not exist.
procedure OnGetPerCompanyUpgradeTags(var upgradeTags: List of [Code[250]])
Use this event if you want to add upgrade tags for PerCompany upgrade method for a new company.
upgradeTags List[Code]
List of [Code[250]]. List of upgrade tags that should be inserted if they do not exist.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.