Изменить

Поделиться через


RunOnClient attribute

Version: Available or changed with runtime version 1.0.

Sets whether a .NET object that is defined by a variable is run on the Business Central Web client or Dynamics 365 Business Central service.

Note

This attribute is supported only in Business Central on-premises.

Applies to

  • Variable

Syntax

[RunOnClient]

Remarks

The RunOnClient applies to variables of the DotNet data type.

The RunOnClient property is used alongside safe listed APIs that provide access to client-side device capabilities, such as camera or location.

The RunOnClient property is part of .NET interoperability in Dynamics 365 Business Central that you can use to expand your solution using .NET assemblies. With .NET interoperability, you can call methods and properties in a class of a .NET assembly from AL code by defining a variable for the class. When you set the RunOnClient property on a variable, then the class instance that is defined by the variable is instantiated on the Business Central Web client.

Example

For an example on how to use the RunOnClient attribute, see Implementing the Camera in AL.

Get Started with AL
Developing Extensions