Check if a dotnet assembly can be used on client

reijermolenaarreijermolenaar Member Posts: 256
edited 2014-07-30 in NAV Three Tier
What is the best way to check if a dotnet assembly can be used on client side?

I'm using the System.IO.File assembly to move a file on client side.
Of course this is not possible in combination with the new NAV2013 WebClient.
So I want to check if the assembly can be used.

I thought I could use the CANLOADTYPE for this but is seems not to work:
MESSAGE(FORMAT(CANLOADTYPE(IOFile))); // <- Says: Yes
IOFile.Exists('');  // <- Says: The operation cannot complete because it uses a feature that is not supported (.NET Framework Interoperability.)
Till now I have placed a command in a codeunit.run to see if it succeeds.
This is working but it's not ideal because it can't be used in a transaction.
Is there a better way to do this?
Reijer Molenaar
Object Manager

Answers

  • kinekine Member Posts: 12,562
    To move the file to client you have building commands directly in C/AL, why to use dotnet?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Allan_BollAllan_Boll Member, Microsoft Employee Posts: 7
    You mentioned NAV2013: if you're on NAV2013, then there's a function called CanRunDotNetOnClient in the File Management codeunit.
  • reijermolenaarreijermolenaar Member Posts: 256
    Thanks Allan, that was exactly what I was looking for!
    Reijer Molenaar
    Object Manager
  • udayrmerudayrmer Member Posts: 171
    Hi All,

    I want to create new directory at shared path from web client, is it possible to do?

    Thanks in Advance
    Uday Mer | MS Dynamics NAV Techno-Functional Consultant
Sign In or Register to comment.