Is it possible to send a message to specific USERID

colingbradleycolingbradley Member Posts: 162
When the receivals person has booked some goods, I would like to have a pop-up message for the Sales person letting them know one of their orders (drop shipment) has had some action.

Anyone done anything like this?

Is it even possible?

Many thanks,
Colin
Experience is what you get when you hoped to get money

Comments

  • PhennoPhenno Member Posts: 630
    When the receivals person has booked some goods, I would like to have a pop-up message for the Sales person letting them know one of their orders (drop shipment) has had some action.

    Anyone done anything like this?

    Is it even possible?

    Many thanks,
    Colin

    you do have USERID var. It holds a name of logged in user.
  • colingbradleycolingbradley Member Posts: 162
    Yes I know who the user is, I am thinking to use the User Setup table to flag the "sender" and "receiver" link and then use a trigger in Codeunit 90 to send the message to a messages table.

    The bit I have not worked out is how to get a window to pop up automatically for the "receiver" with a list of orders ready for printing labels and shipping notes. They can then check off the orders actioned which will 'close' the message.
    Experience is what you get when you hoped to get money
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    You can make a singleinstance codeunit for this that uses a timer control.

    Do you have experience with this principle?
  • PhennoPhenno Member Posts: 630
    Do you want to make something like Bussines Notification?
  • colingbradleycolingbradley Member Posts: 162
    Hi Mark, not had any experience with singleinstance codeunit using a timer control, is there an example in V4?
    Experience is what you get when you hoped to get money
  • colingbradleycolingbradley Member Posts: 162
    Phenno, Have to admit not knowing much about Business Notification, does this do the messaging with pop up forms?
    Experience is what you get when you hoped to get money
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    You can have a look at codeunit 5065 E-Mail Dispatcher
  • PhennoPhenno Member Posts: 630
    Phenno, Have to admit not knowing much about Business Notification, does this do the messaging with pop up forms?

    Well... kind of. Take a look at /Docs folder on installation CD of Navision, you'll find some documentation about it. Also, search mibuso for "Bussines Notification". Though, it's limited to some predefined notification types (actually, triggers) such as: inventory min limit reached, order posted, etc.
  • colingbradleycolingbradley Member Posts: 162
    Thanks guys.

    Looking into this (codeunit 5065) so far I have found several very new and scary things, Table variable Session and so on.

    I will have to take some time out and do some serious research.

    If I eventually get a nice simple solution not connected to E-Mails I will do a post.

    #-o
    Experience is what you get when you hoped to get money
  • Dmitry_ChadaevDmitry_Chadaev Member Posts: 52
    There is one thing about single instance codeunits with timer - in multi-user environment people will have clients running on different PCs, so they will all have "their" single instances. So I dont think that you can actually "send" messages from one client to another through the single instance codeunit, but you could make a kind of dispatcher which starts from Codeunit 1 when the client starts - fill in a table with reminders and make sure that the codunit checks this table once in a while and shows messages if current userID matches the one stored for the reminder...
    Best regards,
    Dmitry
  • colingbradleycolingbradley Member Posts: 162
    Thanks Dmitry, Sounds like a good place to start. I just need to get to grips with the Navision Timer by the sound of things, however, if anybody has already built a simple messaging system not related to email then feel free to make it available...
    Experience is what you get when you hoped to get money
  • Dmitry_ChadaevDmitry_Chadaev Member Posts: 52
    Simlest example of a single instance CU working with timer.
    OBJECT Codeunit 99100 My Timer
    {
      OBJECT-PROPERTIES
      {
        Date=29-05-06;
        Time=13:58:49;
        Modified=Yes;
        Version List=;
      }
      PROPERTIES
      {
        SingleInstance=Yes;
        OnRun=BEGIN
                IF ISCLEAR(NTimer) THEN
                  CREATE(NTimer);
                NTimer.Interval := 3000;
                NTimer.Enabled := TRUE;
              END;
    
      }
      CODE
      {
        VAR
          NTimer@1000 : Automation "{3B311C81-140E-11D5-8B18-00D0590B4EC5} 1.0:{3B311C92-140E-11D5-8B18-00D0590B4EC5}:'Navision Timer 1.0'.Timer" WITHEVENTS;
          Counter@1001 : Integer;
    
        EVENT NTimer@1000::Timer@1(Milliseconds@1000 : Integer);
        BEGIN
          MESSAGE('I was here');
    
          Counter := Counter + 1;
          IF Counter = 5 THEN BEGIN
            Counter := 0;
            NTimer.Enabled := FALSE;
          END;
        END;
    
        EVENT NTimer@1000::TimerError@2(ErrorString@1000 : Text[1024]);
        BEGIN
        END;
    
        BEGIN
        END.
      }
    }
    
    Best regards,
    Dmitry
  • colingbradleycolingbradley Member Posts: 162
    Excellent, many thanks.
    Colin
    :D
    Experience is what you get when you hoped to get money
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    Why don't you just send an e-mail with the SMTP OCX downloadable here? In that case, you can even send it to the mobile phone e-mail address of the salesperson, which is waaaay cool...
  • SavatageSavatage Member Posts: 7,142
    Also take a look at this "Navision Messenger v01 "
    http://www.mibuso.com/dlinfo.asp?FileID=567
  • davidcubittdavidcubitt Member Posts: 1
    I did something fairly brutal with this once. I ran the alerter / messenger by using net send from the command line.

    So you can either run a command line batch file or do

    net send username "message".

    This meant it would get there even if Navision was not running.

    You would need to enable both the alerter & messenger services.

    Like I said, fairly brutal!
Sign In or Register to comment.