cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction Notification

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

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.

Answers (3)

Answers (3)

daroy_alvin
Active Participant
0 Kudos

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

Former Member
0 Kudos

Hi,

Anyone please help me. Its urgent.

Regards

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Hope you have got the answer here:

Please help to close the thread.

Thanks & Regards

Ankit Chauhan

Former Member
0 Kudos

Hi,

Plz help me.

Regards