Hi everyone,
I prepared c# code where I added some data and i want to get this data in NAV.
Everything is ok, when I only display this data in C# code (for example with MessageBox.Show), but when i'm trying to get this in C/AL (MESSAGE(data)) - something is wrong, because it does not work.
This is Control Add IN, so i added field on the page with this AddIn, and i'm trying to enter the c/al code in ControlAddIn trigger.
What is wrong?
Code on this screen below:
![]()
DnD = DotNet Variable with my AddIn .dll.
Drag a File And Drop - field on the page with ControlAddInProperty - add in name + add in public token.
How can I get any datas from my dotnet dll? I need this, because I have to add some information about drag and drop files to nav tables.
Code which I want to have in NAV.
public void picbox_dnd(Object sender, DragEventArgs e)
{
string[] filecollection = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (string file in filecollection)
{
data = Path.GetFullPath(file);
MessageBox.Show(data);
}
}
Thanks for any ideas!