Skip to Content

Transaction Notification

Dear All Experts,

I want to create a Transaction Notification for Sales Opportunity that if a Sales Opportunity is clicked lost in summary Tab then user should enter the reason for that. (OPR5.ReasondID should not be left empty).

Plz help me to do that.

Regards

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Apr 23, 2015 at 12:33 PM

    Hi,

    Try this:

    IF (@transaction_type = 'A' or @transaction_type = 'U') AND @object_type = '97'

    Begin

    IF exists(SELECT T0.[OpprId] FROM OOPR T0 left join OPR5 T1 on

    T0.[OpprId] = T1.[OpportId] WHERE T1.[ReasondId] is null and t0.OpprId = @list_of_cols_val_tab_del )

    BEGIN

    SET @error = 1

    SET @error_message = N'Not allowed to choose lost without adding reason'

    END

    END

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 23, 2015 at 10:33 AM

    Hi,

    Anyone please help me. Its urgent.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 26, 2015 at 02:43 AM

    Hi Kuldeep,

    Please try below query.

    IF @transaction_type in ('U','A') AND @object_type = '97'

    Begin

    IF exists(SELECT T0.[OpprId]

    FROM OOPR T0

    left join OPR5 T1 on T0.[OpprId] = T1.[OpportId]

    WHERE T1.[ReasondId] is null and

    T0.[Status] = 'L' and

    t0.OpprId = @list_of_cols_val_tab_del)

    BEGIN

    SET @error = 1

    SET @error_message = N'Please add reason for current Opportunity Status.'

    END

    END

    Thanks & Regards,

    Alvin

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 23, 2015 at 09:26 AM

    Hi,

    Plz help me.

    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.