on 2023 May 23 11:51 AM
in sale order i created one udf feild, in udf feild there are two drop down (sapre and set) if i choose sapre the docnum is must start in 30000 otherwise entry dont allowed
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if you need to have an automatic selection of the Numbering series , you need to set up a formatted search on that field. Syntax would be approx (note that I do not know your field naming or values):
SELECT
CASE WHEN $[$U_UDF.0] = 'sapre' THEN T0."Numbering series wanted"
ELSE T0."Other numbering series"
END
FROM NNM1 T0
Change the respective field names and values.
If you want a block in case someone selected the wrong Numbering series, you need a Stored Procedure (TransactionNotification). Add the variable block_cnt (int) to the list and add this code:
IF :object_type = N'17' AND (:transaction_type = N'A') THEN
SELECT IFNULL(COUNT(*),0) INTO block_cnt
FROM ORDR T0
WHERE T0."DocEntry"= :list_of_cols_val_tab_del
AND ((T0."U_UDF" = 'sapre' AND T0."Series" = 'Set numbering series') OR (T0."U_UDF" = 'set' AND T0."Series" = 'Sapre numbering series'));
IF :block_cnt > 0 THEN
BEGIN
error := 1;
error_message := N'Wrong numbering series selected';
END;
END IF;
END IF;
BR,
Matija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
15 | |
8 | |
7 | |
5 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.