on 2021 Nov 17 5:08 AM
I want to prevent any user from adding a new SO if the customer ref no (NumAtCard) is not in uppercase.
allowed only for alphanumeric / numeric/ alpha and not allowed for special charaters.
Validation using the SBO SP_Transaction Notification.
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.
Thanks for your reply.
I'm tried as per the below SP.
If @object_type = '17' and @transaction_type in ('A', 'U')
BEGIN
IF EXISTS (SELECT distinCt numatcard FROM ORDR
WHERE (PATINDEX('%[~,@,#,$,%,&,*,(,),:,|,/]%',numatcard COLLATE Latin1_General_CS_AS)>0
OR PATINDEX('%[abcdefghijklmnopqrstuvwxyz]%',numatcard COLLATE Latin1_General_CS_AS)>0 )
and DocEntry = @list_of_cols_val_tab_del)
Begin
SET @error = 2
SET @error_message = 'lower case or special characters are not allowed in customer reference no field'
End
END
User | Count |
---|---|
17 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
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.