D365 Business Central : Get Client Type in AL
If you want to know, if a user accessing BC from a device, desktop, or API, you can use the Client Type.
Let’s say for an example, you want to limit user modifying from from tablet or phone, you can use CurrentClientType method.
field(12; "Item No."; Code[50])
{
Caption = 'Item No.';
DataClassification = CustomerContent;
trigger OnValidate()
begin
if CurrentClientType IN [ClientType::Phone, ClientType::Tablet] then
Error('Modification is not allowed using phone or table.');
end;
}
1 Response
[…] Get Client Type in AL […]