Udostępnij za pośrednictwem


Changes in C/AL Behavior and Support in Microsoft Dynamics NAV 2018

Applies to: Microsoft Dynamics NAV 2018. See Microsoft Dynamics NAV 2017 version.

The following tables provide an overview of the new, removed, or changed C/AL data types, functions, properties, and triggers in Microsoft Dynamics NAV 2018 since Microsoft Dynamics NAV 2017. For more information about the changes, see the specific topic about the data type, function, property, or trigger.

C/AL Data Types

The following table lists the new data types in Microsoft Dynamics NAV 2018.

Data Type Description
SessionSettings A complex data type for passing user personalization settings for a client session as an object. You can use the AL methods of the SessionSettings data type to get, set, and send the user personalization settings for the current client session.

For more information, see SessionSettings Data Type.

See the C/AL Functions section that follows for a description of the data type functions.

C/AL Functions

New functions

The following table lists the new functions in Microsoft Dynamics NAV 2018.

Function Description
CANCREATTASK (TaskScheduler) Indicates whether a user has permissions to create or schedule a task.
DISPLAYNAME Gets the display name that is defined for a company.
Company (SessionSettings) Gets or sets the company property in a SessionSettings object.
INIT (SessionSettings) Populates the instance of a SessionsSettings with the current client user's personalization properties (such as Profile ID and Company) that are stored in the database.
LANGUAGEID (SessionSettings) Gets or sets the language ID property in a SessionSettings object.
LOCALEID (SessionSettings) Gets or sets the locale ID property in a SessionSettings object.
PROFILEAPPID (SessionSettings) Gets or sets the ID of an extension, which provides a profile, in a SessionSettings object.
PROFILEID (SessionSettings) Gets or sets the profile ID property in a SessionSettings object.
PROFILESYSTEMSCOPE (SessionSettings) Gets or sets the profile scope property in a SessionSettings object.
REQUESTSESSIONUPDATE (SessionSettings) Passes a SessionSettings object to the client to request a new session that uses the user personalization properties that are set in the object. The current client session is abandoned and a new session is started.
SENDTRACETAG Sends a telemetry trace event.
TIMEZONE (SessionSettings) Gets or sets the time zone property in a SessionSettings object.

C/AL Properties

New properties

The following table lists the new properties in Microsoft Dynamics NAV 2018.

Property Description
ObsoleteReason Property Specifies why a table, field, or key has been marked as Pending or Obsolete in the ObsoleteState property.
ObsoleteState Property Marks whether the table, field, or key is or will become obsolete (deprecated).

Changed properties

The following table lists the new properties in Microsoft Dynamics NAV 2018.

Property Description
SubType Property The Install option has been added for adding code that runs when you install an extension.

C/AL Triggers

The following table lists the changed triggers in Microsoft Dynamics NAV 2018.

Trigger Description
OnCheckPreconditionsPerCompany() and OnCheckPreconditionsPerDatabase() Used to check that certain requirements are met in order to run the upgrade.
OnUpgradePerCompany() and OnUpgradePerDatabase() Used to perform the actual upgrade.
OnValidateUpgradePerCompany() and OnValidateUpgradePerDatabase() Used to check that the upgrade was successful.
OnAfterUpgradeCommitPerCompany() and OnAfterUpgradeCommitPerDatabase() Used to perform post-upgrade tasks after transactions in the previous triggers are committed.

See Also

Functions Not Supported by Microsoft Dynamics NAV Web Client
Page Properties Not Supported by Microsoft Dynamics NAV Web Client