Skip to Content
author's profile photo Former Member
Former Member

Alert generation from Add-On

Hi,

Can anybody explain me how can I use Alert in my Add-On.

I mean I have an user-defined table T1 and a filed F1. An Alert will be sent to an user if value of F1 exceeds 50.

If I generate an Alert with the Saved Query in Alert Management, then what will be my query.

Thanx & Rgds

Sibasish

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Aug 03, 2008 at 09:25 PM

    Hi Sibasish,

    If you just want an alert that shows any records in your table where a field has a value greater than 50 then it will be:

    select * from [@MYTABLE] where U_MYFIELD > 50
    

    This is standard SBO functionality so it's not really part of your addon (although, obviously, the UDT must exist for the query to work). You can use the UserQueries and AlertManagementService objects in the DI API to create your query and alert when your addon is installed.

    Kind Regards,

    Owen

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 04, 2008 at 05:47 AM

    Hi Sibasish,

    Yes, you can. But the user will always receive a message event there is any rows inside or not (even your query returns no rows, you also got the message).

    > Select * from [dbo].[@T1] where isnull(F1,0) > 50

    As Owen has been written, an intelligent solution is to write a simple Add-on (same code is used for each points)

    1. Your add-on, when your eventhandler will send a message from code to the user

    or

    2. VB service, which runs on the server and check time-by-time the table and sends a message from code to the user.

    Regards,

    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.