on 07-22-2011 7:55 AM
Hi All,
Is it possible to fire a SP only if following occurs
while adding it fires very well.
but, it fires in update mode too.
I want to fire it only when user changes the quantity in sales order.
Thanks
Malhaar
Hi!
It can be done validating with the Log table of the Document in update mode.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Malhaar,
You can try:
IF @transaction_type IN (N'A', N'U') AND @Object_type = N'17'
BEGIN
IF exists (SELECT T0.DocEntry, MAX(T1.LogInstanc) from RDR1 T0 INNER JOIN ADO1 T1 ON T1.DocEntry=T0.DocEntry AND T1.Linenum=T0.LineNum AND T1.ObjType=17
where T1.Quantity != T0.Quantity AND T0.DOCENTRY = @list_of_cols_val_tab_del
GROUP BY T1.BaseEntry)
Begin
select @Error = 17, @error_message = 'SO quantity must not be changed'
End
END
Thanks,
Gordon
Hi Malhaar.......
You can do this when you add but it is not possible to make the system understand when you update a particular field......
So it is not possible for updation command in SP for a particular field......
Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.