Skip to Content

How to show a pop up notification upon registering new Sales Orders?

Good day everyone,

This is going to be my first post here 😊. At my place we have couple of SAP users / instances. We have also some agents outside that would be registering new sales orders via tablets. The tablet app sends new sales orders to SAP server and the new orders get registered under sales orders inside SAP Business One. My question, how to show a pop up window on the screen of every open SAP Business One instance (or for specific users) upon registering a new order sent from the tablets? How to hook the Sales Order registration process in order to show a pop up at the very moment a new sales order gets placed inside the system?

Thanks very much.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Dec 28, 2015 at 05:37 PM

    Hi Waseem Massry, I've used something similar on a client.

    It can generate a standard warning in SAP Business One using user queries and using the data as a condition of the last warning sent but you need to check various details.

    Step 1 is to make a query that lists the sales orders and save it.

    Sample Query to be created:

    SELECT T0. [DOCNUM] T0. [DocDate] T0. [CardCode] T0. [CardName] T0. [DocTotal]



    Step 2 is to check the query ID saved, for this execute the query below:


    In this case the last query was added to ID # 285


    Step 3 is to create a warning system alerts management


    Step 4 is to check the parameters used by the new alert, for this use the query:

    SELECT Code, Name, QueryID, LastDate, lasttime, NextDate, nexttime, * FROM OALT

    At this point it is important to understand that:

    - QueryID query ID is used by the alert

    - LastDate is the date of the last time the alert

    - Lasttime the time of the last alert execution


    Step 5 edit the previously created query and include some conditions WHERE

    SELECT T0. [DOCNUM] T0. [DocDate] T0. [CardCode] T0. [CardName] T0. [DocTotal]


    WHERE T0. [CreateDate] >= (SELECT FROM LastDate OALT where QueryId = '285')

    AND CAST(T0. [DocTime] as int) >= (SELECT cast (lasttime the int) FROM OALT where QueryId = '285')

    In the above query test whether the document creation date is greater than the last alert

    sent, then we tested whether the time the document is greater than the time of the last alert


    After saving is ready.

    Then the administration of alerts should start sending them to users.

    You may need to make some adjustments.

    How is your first post, if the answer solved their need do not forget to mark as "correct answer".


    Rodrigo da Costa Feula

    Add a comment
    10|10000 characters needed characters exceeded

    • Code works perfectly. I have set the task to run every minute, so that is almost real time 😊

      How do you think SAP built in notifications can get fired by SQL built in NotificationQuery ? If that is possible then real time notifications can be achieved.

  • Posted on Dec 29, 2015 at 12:12 PM


    Please follow Rodrigo da Costa Feula reply and its excellent.

    Only the issue is user needs to login to get such alerts.

    Thank you.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 28, 2015 at 06:09 PM

    Dear Waseem

    Create an alert with following query, this will pop up an alert to a concern person to whom this alert will be assigned, as I have also used document time, so the pop up will only show all open Sales Orders which are create in last 5 min, hope this works for you,

    SELECT T0.[DocNum], convert(varchar(10),T0.[DocDate],101), T0.[CardCode], T0.[CardName], T0.[NumAtCard]


    WHERE convert(varchar(10),T0.[DocDate],101) = convert(varchar(10),getdate(),101)

    and T0.[DocStatus] = 'O' and T0.DocTime >= convert(int,concat(left(convert(varchar(5),getdate(),108),2),Right(convert(varchar(5),getdate(),108),2)))-5

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.