Skip to Content
0

Block sales quotation without Oppertunity

May 03 at 05:35 AM

20

avatar image

Hi,

My requirement is,

All the sales quotation has to be raise through opportunity and i want to block the direct sales quotation creation. I'm trying this below SP and it's working fine, but it's blocking sales quotation which is create through opportunity also.

IF @transaction_type in ('A') AND (@OBJECT_TYPE='23')

BEGIN

If exists (Select T2.docentry from OOPR T0 INNER JOIN OPR1 T1 ON T1.OpprId = T0.OpprId and T1.ObjType='23'

left join OQUT T2 on t2.DocEntry <> T1.[DocID]

left JOIN QUT1 T3 ON T2.DocEntry = T3.DocEntry

where T2.DocEntry = @list_of_cols_val_tab_del )

Begin

SET @error = 10

SET @error_message = 'Sales quotation not allowed without sales opportunity'

End

End

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers