Hi All
I want to user should always cancel the SO in case it has been created wrongly.I have created below notification for that but it is not working.
if @transaction_type IN (N'A', N'U') and @object_type = '17'
begin
if exists(select T0.docentry from ORDR T0 inner join RDR1 T1 on T0.DocEntry=T1.DocEntry
where T0.docentry = @list_of_cols_val_tab_del and
(T1. trgetenty IS NULL AND T0.docstatus='C' AND T0.Cancelled ='N'))
begin
SET @error = 17
SET @error_message = N'! Please use CANCEL option !!'
end
end
Please advise
Thanks & Regards
Preeti