cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping lowercase in numatcard (Customer Ref. No.) when adding the Sales order

hemabhushan_g
Explorer
0 Kudos
98

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Johan_H
Active Contributor
0 Kudos

Hi,

Please check the answer to this similar question.

Regards,

Johan

hemabhushan_g
Explorer
0 Kudos

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

Johan_H
Active Contributor
0 Kudos

Hi hemabhushan.g,

If it works, please mark this answer as the right answer, so others may benefit from your solution.

Regards,

Johan