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

Approval and alert management.

Hi,

To avoid the duplication of creating the Sales Order for a customer within 24 hours, I want to create approval template or something to pop out (alert management) from the screen showing that “the Sales Order has been created" based on the BP. It is only allowed to create one SO per BP a day.

I saw one simple query for the Approval example.

Any idea?

Thanks in advance,

Bruce.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Aug 08, 2005 at 08:16 AM

    Hi Bruce!

    here is your simple query, which u can add to approval procedure template:

    [code]IF (

    SELECT COUNT(*)

    FROM ORDR T0

    WHERE T0.DocDate = CONVERT(DateTime, $[ORDR.DocDate], 4)

    AND

    T0.CardCode = $[ORDR.CardCode]

    ) > 0

    SELECT 'TRUE'

    ELSE

    SELECT 'FALSE'[/code]

    <i>Message was edited by: Alexey Grebennikov

    a little late...</i>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 08, 2005 at 08:14 AM

    This query should do the trick

    SELECT COUNT(DocEntry)

    FROM ORDR

    WHERE DATEDIFF(day, DocDate, getdate()) = 0

    AND CardCode = 'YourCardCode'

    if the count is greater than 0 then you can Alert. (else add the SO as per usual)

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 03:21 PM

    I have created a UDF that specifies whether a Sales Order has been "Picked" and would like to ensure that a user cannot modify it afterwards without an Approval. I have my SQL code and it works properly but only when the Sales Order is created and does not get triggered when it gets modified.

    Thanks, Richard.

    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.