on 01-22-2016 2:09 PM
Hi Experts,
One scenario, For particular customer they need particular item should be listed in the sales order.
So what i did it i have created user defined field in the item master table (OITM).In that field i gave customer code .
In sales order form, i added a FMS in the item code field.
FMS: SELECT T0.itemcode from oitm T0 where t0.u_custname = $[ordr.cardcode]
If i gave that particular customer code, it displays item code. But also add other item code and if i press tab button . It displays all item code.
It should not display any other item code and also restrict to non item codes.
Kindly give some guidance to me.
Thanks.
Hi,
FMS query will not control other item selection in sales order. You have to use transaction notification if selected item is different from OITM UDF.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this SP.
IF (@object_type='17' and ( @transaction_type='A' OR @transaction_type='U'))
Begin
if exists
(SELECT T0.docentry, t1.itemcode FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode] WHERE T2.[U_custname] = T0.[CardCode] and T0.[Docentry] =@list_of_cols_val_tab_del )
begin
set @error='1001'
SET @error_message='Invalid item no '
end
End
Thanks
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 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.