Automatic POPUP alert in task bar for NAV USER ??

pskannaapskannaa Member Posts: 138
Hi,
I want to send 'POPUP' alert in NAV users, if i aloting a document for approvel to respective user, after save the record by the time the USER get automatic popup saying that ' you hav one document for approvel'(eg. working in outlook, new mail arrival popup in system)...

how can i proceed this in NAV, what is a concept can i use ? steps plz..

Using NAV 4.0.


Thanks & Regards,
Psk

Comments

  • matttraxmatttrax Member Posts: 2,309
    There's not really a good way to do it...

    1) Every user can have a Form open all the time. In the OnTimer trigger of that form it checks to see if there is a new entry for them and generates the pop-up. Uses system resources that could be better allocated, though.

    2) I'll assume you are not on NAV 2009. In that version comments have been replaces with notes, basically a comment that you can "send" to another user. It appears in their Role Center so anytime they are at their "home page" they see new notifications. This is your best bet in my opinion, although it's not a pop-up.

    3) Write some code (probably through .NET) to keep track of what user is logged on from what source and send a message appropriately. A similar protocol to something like instant messenger.
  • kinekine Member Posts: 12,562
    You do not need to have some form open and use the OnTimer. You can use singleinstance codeunit with the NTimer DLL used for the timer to check if there is some new message. You can open some form with the message when you need... but be carefull, if users are heavilly working, the form or message can disturb them. It is not problem to create own DLL which will allow you to create "Balloons" with informations on the tray bar.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • pskannaapskannaa Member Posts: 138
    do you hav any program logics/objects for creating "ballons with infor" in .net dll. ??

    can you plz provoide me some inputs for creating this so that i can build further....
  • kinekine Member Posts: 12,562
    Yes, I have, but I cannot share them, it is company property...

    1) Learn how to create DLL which can be used in NAV (there are examples on mibuso). What you will learn will be good for you. This will be your new experience with e.g. C# and other things. Take it as investment into your future...
    2) Use standard NotifyIcon class to create the info balloon in Visual Studio
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • pskannaapskannaa Member Posts: 138
    Thanks Kine...
    I know well in .net programing...what i ask you is which object/class that can be used b'cz i didn't worked on this concept...

    once again thanks for input 'NotifyIcon class' ...i will do this ...
  • pskannaapskannaa Member Posts: 138
    Hi Kine,

    I hav done the sample code in .net, now how can i use the dll in NAV using automation...

    how to take the class from NAV. ...steps of configuration plz.
  • pskannaapskannaa Member Posts: 138
    No Reply !! If any one can help me it will be apprc..

    i hav registered dll(strong named & assembly), but when i declare var as 'automation' and select my dll file i couldn't be loaded in variable session 'no classes are shown'..

    registerd:
    put my dll in 'Program Files\Microsoft Business Solutions-Navision\Client '
    regasm /tlb:NAVNotifyClass.tlb E:\NAVNotifyClass.dll
    gacutil /i E:\NAVNotifyClass.dll

    but , something is missing..

    when i use .regsvr32 <dll>
    shwoing err: DllRegisterServer entry point was not found.

    may be be'cz of this issue, i couldn't call from NAV...
  • kinekine Member Posts: 12,562
    1) It is .net dll - you need to register it by regasm.exe (or Visual Studio will do it for you if you set it in the properties of the project)
    2) You need to define public interface with correct parameters to show the interface in NAV.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • aavioaavio Member Posts: 143
    hey 8)
    U need to define the function in a COM class. Also dont forget to set the com class property 'com visibility' to true, and in project properties... go to compile tab..... enable 'register for com interop' option :!:
    aav!o
  • pskannaapskannaa Member Posts: 138
    I don't know what is worng !! not comming..

    i hv set the project prop- 'reg for com enabled'

    my class looks like
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface myInterface()
    {
    void myMethod();
    }

    [ClassInterface(ClassInterfaceType.None)]
    public class MyClass : myInterface
    {
    MyClass()
    {
    }
    void myMethod()
    {
    //print message...something
    }
    }

    'Compile it' and take a copy of my dll into d:\
    command propmpt: regasm d:\myNAVTest.dll /tld:myNAVTest.tlb
    and then copy the both 'dll and tlb' file into /program files/common files/navision/..dir

    In NAV, if i select the assembly(dll) , No classes are shown on the variable declaration form !!!

    i couldn't process...

    what is wrong !!!
  • kinekine Member Posts: 12,562
    Example>
       [ComVisible(true)]
        [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
        [Guid("...your guid...")]
        public interface INAVClass
        {
            [DispId(1)]
            void Method1(string param1);
    
            [DispId(2)]
            string Method2(string param1);
        }
    
        [ComVisible(true)]
        [Guid("....another guid....")]
        [ClassInterface(ClassInterfaceType.None)]
        public class NAVClass : INAVClass, IDisposable
        {
            public void Method1(string param1)
            {
            }
    
            public string Method2(string param1)
            {
            }
        }
    

    Of course, do not forget about Dispose method etc. to clear the object from mem.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • pskannaapskannaa Member Posts: 138
    Find, now i can see the method,

    but while calling the method it's creating error;

    in NAV
    If isempty(myObject) then CREATE(myObject);

    myObject.myMethod();

    err:
    Could not invoke the method myMethod. the ole control or automation server returned the folowing message.
    The requested member doesn't exist, or the call tried to set the value of read-only property.


    any idea ???
  • kinekine Member Posts: 12,562
    Without the code hard to say. You can use the visual studio debugger to debug the project and to see where is the problem. I even do not know, if you correctly selected the class in NAV and not the interface for the automation variable...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    pskannaa wrote:
    Hi,
    I want to send 'POPUP' alert in NAV users,

    Hi pskannaa,

    I am not sure if you are a NAV partner or a NAV user. But If you are a partner let me help you out.

    WARNING!!!! The following information is not to be read by NAV Customers or Users. If you are a NAV Customer please stop reading now.

    The phrase "We Need To Send POPUP Alerts" is a secret NAV code phrase. Translated into English it means "We have too much money, and rather than fix up our business processes, we would like to give that money to you, our Partner, to write lots of unnecessary code that probably wont really work anyway, and most definitely will make our work more difficult, and then in six months time we will pay you lots more money to remove all the POPUPS that we really never needed in the first place. Also please if you see other areas of our business that we are doing wrong, feel free to simply tell us 'Yeah We Can Program That' and send us a big bill."
    David Singleton
  • pskannaapskannaa Member Posts: 138
    Thank U all ...finally i got it. Unregistered completly and register...the issue was .net event handler..
  • aavioaavio Member Posts: 143
    pskannaa wrote:
    Hi,
    I want to send 'POPUP' alert in NAV users,

    Hi pskannaa,

    I am not sure if you are a NAV partner or a NAV user. But If you are a partner let me help you out.

    WARNING!!!! The following information is not to be read by NAV Customers or Users. If you are a NAV Customer please stop reading now.

    The phrase "We Need To Send POPUP Alerts" is a secret NAV code phrase. Translated into English it means "We have too much money, and rather than fix up our business processes,
    @David Singleton:
    no need to translate to english, its already in..... :mrgreen::mrgreen::mrgreen::wink:
    =D> pskannaa =D>
    aav!o
  • garakgarak Member Posts: 3,263
    @ pskannaa: Why do you not use the mail functionality to send an e-mail?
    With the most email clients you can also activate the "balloon info" functionality.
    So you doesn't need the NavTimer/with single inst. CU or the DLL and / or Socket option .....

    The good thing on the mail solution is, you can also add in the body of the mail a hyperlink to NAV\FormAndRecord

    Regards
    Do you make it right, it works too!
  • idiotidiot Member Posts: 651
    Oddly this kind of "popup" requests that seems strange or redundant are actually quite common among higher levels...

    Why popup & not emails: Emails are meant strictly for the next golf session, realized returns kinds of news, not for "You have one pending approval".
    Why reports designer/generator is easy to use doesn't matter: Someone can just print me a copy, together with the coffee.
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
Sign In or Register to comment.