Compartir a través de


DELETEARCHIVEDATA Function

Deletes the archived data for a specified table of an extension during installation.

[Ok :=] DELETEARCHIVEDATA (TableNo)

Parameters

  • TableNo
    Type: Integer Specifies the ID of the extension table whose archived data you want to delete.

Return Value

Type: Boolean

true if the archived data was deleted for the specified table; otherwise, false.

If you omit this optional return value and if archived data cannot be deleted for the specified table, then a run-time error occurs. If you include a return value, then it is assumed that you will handle any errors and no run-time error occurs, even though the archived data is not deleted.

Remarks

You use this function as part of the upgrade code for an extension, where it is called from the OnNavAppUpgradePerDatabase() or OnNavAppUpgradePerCompany() system functions. When an extension is uninstalled, the data in application tables of the extension is automatically stored into a set of special tables so that the data is still preserved. With the RESTOREARCHIVEDATA, you can restore the archived data to the application table of the new version of an extension when it is installed. For more information and sample code, see Upgrading NAV Extensions and How to: Write Extension Upgrade Code.

See Also

Tasks

How to: Develop an Extension

Reference

DELETEARCHIVEDATA Function

Concepts

Extending Microsoft Dynamics NAV Using Extension Packages

Other Resources

GETARCHIVEVERSION Function
GETARCHIVERECORDREF Function
NAV App Data Type